Skip to main content

All Questions

Tagged with
1 vote
0 answers
21 views

Unable to iterate over files using ZSH alias [duplicate]

I have simple command to iterate JPG files for f in *.JPG;do echo "Processing $f";done The terminal output is as follows: Processing IMG_0316.JPG Processing IMG_0317.JPG Processing IMG_0318....
0 votes
1 answer
63 views

How can I know which are my most used aliases?

I would like to know which aliases I use most often, in both zsh and vim, so I can rename them to have more or fewer letters depending on the use. And also to remove aliases I never use, because I ...
3 votes
2 answers
856 views

Making an alias which maps arguments to the middle of the command

I want to alias killapp X to pidof X | xargs kill or kill `pidof X`, but I can't think of a way to do this with just an alias on killapp. How could I do this so I don't have to do killapp X` ?
9 votes
1 answer
6k views

How to overwrite aliases in my shell (Oh My Zsh)?

I would like to alias my ls command, but there is a previously defined alias for it which I believe gets invoked first before my definition! I am using .zshrc to define my alias, and here is what I ...
0 votes
1 answer
510 views

zsh alias not being unaliased in zshrc

[leading dots elided because I don't want to type them] An alias--gl--is set to git pull by a plugin in my zshrc. I want to set it to a git log command. I'm on macOS and, as expected, /etc/zshrc is ...
1 vote
2 answers
5k views

How do I search my zsh aliases?

Right now I do something like this: cat ~/.oh-my-zsh/plugins/git/git.plugin.zsh | grep alias | grep rebase to search, say, git aliases that have rebase. How do I search through all plugins that ...
2 votes
2 answers
401 views

create an alias on ZSH but need to type it twice

I'm trying to create an alias on ZSH. The aim of the alias is to activate a python virtualenv. I've put a line in my .zshrc alias SOU="source /home/andykw/.zshrc && source $(setopt ...
7 votes
5 answers
6k views

Get the expansion of an alias (in both bash and zsh)

I want to get the expansion of an alias. For example, if I have: alias g=hub alias cdh='cd $HOME' I want to have: expand_alias g == hub expand_alias cdh == cd $HOME The tricky thing is that the two ...
9 votes
3 answers
6k views

sudo: nocorrect: command not found

I am using zsh and oh-my-zsh on Arch Linux. I am not able to make directory using mkdir edward@ArchLinux ~ $ sudo mkdir -p /samba/raspberry [sudo] password for edward: sudo: nocorrect: command ...
2 votes
2 answers
150 views

Create new set of aliases based on current set of aliases (eg. gst -> dst)?

I'm using git aliases from zsh plugins: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/git So it has git aliases like: gst # git status ga # git add gc "commit" # git commit -v "...
0 votes
1 answer
198 views

How to have everything following a ZSH alias be placed in the middle of its definition?

I have this file: /Users/MYUSERNAME/asciidots/asciidots/__main__.py I want to alias this so that it runs as if it was in my current directory. I was thinking something like this: alias asciidots=&...
2 votes
2 answers
965 views

Why do I have to use this command twice to execute it?

I made an alias alias goto="cd $@ && source ~/.zshrc" and it works, but only if I execute it twice. Even after I execute it twice in one shell, and if I want to move to another dir, ...
29 votes
2 answers
5k views

How to make the zsh "correct" functionality remember my spell-correction decisions

I have enabled correction (I wouldn't call it autocorrection specifically because of this issue) in zsh by enabling setopt correct in my .zshrc. Now, when I type dtae in a terminal, I get: dtae ...
0 votes
0 answers
19 views

Generate zsh aliases from zsh script [duplicate]

I wrote a simple script for generating aliases in zsh shell. Here it is: for subject in $(find $path -maxdepth 2 -type d -print) do dir=$(printf -- "$subject\n" | sed 's|.*/||') alias &...
2 votes
2 answers
748 views

How to add an alias for 'git add **/'

I can't seem to add an alias for git add **/ I think those two asterisks is causing an issue, or it could be that forward slash. How do I solve this? So far I have tried alias ga='git add **/' When ...

15 30 50 per page
1 2
3
4 5
8