by bretthopper · 15y ago · 0 comments
Some helpful aliases to manage them:
alias 1='cd -1'
alias 2='cd -2'
alias 3='cd -3'
alias 4='cd -4'
alias 5='cd -5'
alias 6='cd -6'
alias 7='cd -7'
alias d='dirs -v'
alias h='history'
alias j='jobs'
Just one of the many reasons to use ZSH.
What shell doesn't have a directory stack?
function directory_up {
pushd -1
zle reset-prompt
}
zle -N directory-up directory_up
bindkey "\e[5~" directory-up
Ditto for "pushd +0" and PgDn. setopt cdablevars
proj=$HOME/Projects
cd proj
pwd # => /Users/sjs/Projects