I found some questions and answers on stackoverflow but nothing worked for me.
Asked
Active
Viewed 783 times
1
-
1PLease add some detail on what you have tried: which SO questions / answers have you tried and found unhelpful. What did you implement (if possible include code) that did not work? – jalanb Apr 23 '20 at 16:26
-
I tried https://stackoverflow.com/questions/564648/zsh-tab-completion-for-cd and was not able to comment because of my low reputation. So I had to create a new topic. The accepted answer was correct but not exhaustive: "zstyle ':completion:*' special-dirs true" After that the following code has to be inserted too: "autoload -Uz compinit compinit" – G. S. Apr 27 '20 at 09:48
-
1Also the rule to only be able to comment for five minutes is not helpful. – G. S. Apr 27 '20 at 09:55
1 Answers
2
My solution is to put this into ~/.zshrc:
zstyle ':completion:*' special-dirs true
autoload -Uz compinit && compinit
This works for me on macOS 10.15.4 with zsh 5.7.1.
I couldn't answer or comment on the exiting because my 'reputation' was too low.

G. S.
- 41
- 3