6 ms·
In zsh, you (1) don't need to write a function, and (2) you don't need to type "cd" to switch directories. setopt auto_cd alias -g ...='../..' alias -g
by gcv 17y ago
In zsh, you (1) don't need to write a function, and (2) you don't need to type "cd" to switch directories.
setopt auto_cd
alias -g ...='../..'
alias -g ....='../../..'
alias -g .....='../../../..'
alias -g ......='../../../../..'
Then you can just type "..." and go up two directory levels, and so on.
- sant0sk1 17y agoThat's pretty cool. I've shied away from zsh for some time as I'm very comfortable with bash, but a lot of evidence has been coming to me lately that makes me want to give it a go.