5 ms·
No mention of ZSH directory stacks yet? http://www.acm.uiuc.edu/workshops/zsh/dir_stack.html http://www.acm.uiuc.edu/workshops/zsh/dir_stack.html Some helpful
by bretthopper 16y ago
No mention of ZSH directory stacks yet? http://www.acm.uiuc.edu/workshops/zsh/dir_stack.html http://www.acm.uiuc.edu/workshops/zsh/dir_stack.html
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.
- jrockway 16y agoJust one of the many reasons to use ZSH. What shell doesn't have a directory stack?
- ramen 16y agoWhat's the bash equivalent to zsh's "setopt autopushd"?
- deleted 16y ago[deleted]
- FaceKicker 16y agoI don't know what that is, but does it do more than alias cd='pushd'?
- ramen 16y agoThat's essentially what it does, but if you use the "autocd" option as well, you don't need to type "cd" - you can just use the name of a directory as a command. So, "autopushd" would ensure that these operations use the directory stack also.
- cicero 16y agosh
- nolite 16y agonice stuff. You got your dotfiles on a github?
- sjs 16y agoHow about `setopt cdablevars`? setopt cdablevars proj=$HOME/Projects cd proj pwd # => /Users/sjs/Projects
- ringm 16y agoI have bound 'pushd -1' to PgUp. 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.