Is it possible to configure zsh to expand global aliases during tab completion? For example, I have the common aliases:
alias -g '...'='../..'
alias -g '....'='../../..'
but when I type for example cd .../some<tab>
it won't expand to cd .../something
or cd ../../something
. Consequently, I frequently won't use these handy aliases because I can't tab complete where I want to go.
Best Answer
Try looking up zsh abbreviations. They allow you to enter an "abbreviation" which automatically gets replaced with its full form when you hit a magic key such as space. So you can create one which changes
...<SPACE>
to../..
.For example, this is what you need in your profile: