Zsh, directory tab-completion with prefix
Posted
by
nifty
on Super User
See other posts from Super User
or by nifty
Published on 2012-01-23T09:20:42Z
Indexed on
2014/06/11
15:31 UTC
Read the original article
Hit count: 252
I have a directory where I put all my projects in, let's say it's ~/projects
as an example. I've made a command called s
which takes one argument, and moves me into that directory. E.g.: s foo
moves me to ~/projects/foo
.
What I'd like is to have a completion command of some sorts, which would act like cd
so I could do keep hitting tab to go further into the ~/projects/...
directories.
Basically, cd
with a prefix which is always present.
I've looked into zstyle completion in man zshcompsys
, but realized I just don't know enough about it to understand it properly.
© Super User or respective owner