Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Say I have a folder parent with a subfolder, subfolder and a symbolic link symbolic_link.

I noticed that if my current working directory subfolder and I try to do cd ../sym[TAB], it will not autocomplete to cd ../symbolic_link.

How can I enable this type of autocompletion in Zsh?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

zsh will autocomplete a symlink for cd if it points to a valid directory.

parent $ ls -l ../symbolic_link 
lrwxrwxrwx 1 e users 1 Jan 30 23:19 ../symbolic_link -> /
parent $ cd ../symbolic_link/
                 ^^ [TAB] pressed here
parent $ ln -s /asdf ../wrong_symbolic_link
parent $ cd ../wr
                 ^^ [TAB] sound the bell here
share|improve this answer
    
Hmm, I wonder if the reason why it doesn't work for me is because my symlinks point to paths mounted on different machines on the network. It's certainly not working for me (working with ZSH 5.02) –  user815423426 Jan 30 '13 at 22:24
1  
zsh 5.0.2 here and completion works with symbolic links pointing to directories on nfs and sshfs shares. –  Endre Szabo Jan 30 '13 at 22:27
    
Thanks a lot Endre ... I will investigate this on my side. It looks like it works in some places for me too. hmm –  user815423426 Jan 30 '13 at 22:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.