All shells understand these commands:
$ cd .
$ cd ..
And zsh will also understand:
$ cd ...
$ cd ....
Provided you say:
$ alias -g ...='../..'
$ alias -g ....='../../..'
Now, how can I make it do proper tab-completion when I've started typing cd ..../<TAB>
? I recall it was implemented in oh-my-zsh but I've stopped using it now.
It would also be appreciated if it would work not only for cd
, say I want to execute cat ..../a/b/..../c/d | less
.