Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cd .. completion not working #6543

Closed
paweloque opened this issue Jan 12, 2018 · 11 comments · Fixed by #6803
Closed

cd .. completion not working #6543

paweloque opened this issue Jan 12, 2018 · 11 comments · Fixed by #6803

Comments

@paweloque
Copy link

I just installed oh my zsh on a new machine and the 'cd ..' completion is not working. All the other directory and filename completions work properly, but when I type 'cd ..' no proposals for directories in the upper directory are provided. Before installin ohmyzsh, on bash the completion worked properly.

I'm on a Macbook Pro 13'' touchbar with High Sierra 10.13.2 .

@evberrypi
Copy link

That is interesting that it is not working with the cd prefix.
Is it still failing when you type in just .. ?

@paweloque
Copy link
Author

It doesn't work neither with the '..' shortcut.. Do you have any ideas how to analyse the problem?

@joeycozza
Copy link

My only insight is that it does give you proposals if you type cd ../. Maybe it has to do with the fact that there is an alias for ... and .... so it can't expand or give suggestions? Not really sure.

@paweloque
Copy link
Author

paweloque commented Jan 18, 2018

In deed, the cd ../ works like expected. Funny though, that it used to work.. But it's okay now.
I tried to remove the '..' alias, but it seems to be defined using another mechanism that the normal aliases. I don't know the internal workings of ohmyzsh. How are the '..' and '...' aliases defined?

@joeycozza
Copy link

Looks like it is here . https://github.com/robbyrussell/oh-my-zsh/blob/3705d47bb3f3229234cba992320eadc97a221caf/lib/directories.zsh

You could delete those lines from your .oh-my-zsh/lib/directories.zsh file for testing. If removing them does help cd .. to give completion, then you could follow the steps here https://github.com/robbyrussell/oh-my-zsh/wiki/Customization to more fully remove the alias for your use case. If that doesn't make sense, let me know and I can explain it further.

@paweloque
Copy link
Author

I've uncommented the '...' '....' etc aliases, but the completion still doesn't work like before. Interestingly there is no '..' alias in this file. Do you have the '..' alias in your lib/directories.zsh file?
Is it something built in?

@joeycozza
Copy link

Dang. Bummer that didn't work.
Also, when I just run alias to get a list of all aliases that are set, it doesn't even have ".." as an alias. So the double period must be some built in behavior somewhere else, but I couldn't find it. Sorry man.

@paweloque
Copy link
Author

No Problem @joeycozza . You helped me already a lot by telling to try '../'
Thanks!

@mathewmeconry
Copy link

same issue with Fedora 27 and the latest version of oh my zsh

@mcornella
Copy link
Member

This will fix it: zstyle ':completion:*' special-dirs true. We could have that pulled in OMZ though.

@mcornella
Copy link
Member

As a matter of fact, this was asked already in #3775. I'll make a quick PR.

mcornella added a commit to mcornella/ohmyzsh that referenced this issue May 7, 2018
mcornella added a commit that referenced this issue May 7, 2018
aunsira pushed a commit to aunsira/oh-my-zsh that referenced this issue Jun 13, 2018
gsemet pushed a commit to gsemet/oh-my-zsh that referenced this issue Jun 15, 2018
seth-cohen pushed a commit to seth-cohen/oh-my-zsh that referenced this issue Oct 29, 2018
jmartindf pushed a commit to jmartindf/oh-my-zsh that referenced this issue Nov 10, 2018
sagischwarz pushed a commit to sagischwarz/ohmyzsh that referenced this issue Nov 19, 2018
chihchun pushed a commit to chihchun/oh-my-zsh that referenced this issue Aug 6, 2019
kankongmeng pushed a commit to kankongmeng/oh-my-zsh that referenced this issue Jan 8, 2020
spiliopoulos pushed a commit to spiliopoulos/zsh-config that referenced this issue Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants