Home > zsh > ~+ Another Magical ZSH Tip

~+ Another Magical ZSH Tip

November 17th, 2012 Leave a comment Go to comments

I’ve been using zsh’s ability to cd to any of your recent directories for a long while

e.g.

> cd -<tab> which gives you a pick list of recent directories

I’ve just learnt however about the ~+ operator which allows

vi ~+<tab>
1 — /c/aaz
2 — /c/aaa
3 — /c/aax
4 — /usr/bin

I type 1-4 to pick the desired directory and then can continue completion.

remember you need the options in your .zshrc

setopt autopushd pushdignoredups # used by cd-
autoload compinit
compinit

also to remember to visit a few directories beforehand

Categories: zsh Tags:
  1. No comments yet.
  1. No trackbacks yet.