When I type
and hit tab, zsh autocompletes to
this is not a directory that is available to me (in fact I've uninstalled lightdm).
How do I stop this from happening?
I have prezto installed.
This is probably the combination of the
CDABLE_VARS options documented in
% PS1='%# ' zsh -f % setopt AUTO_NAME_DIRS % setopt CDABLE_VARS % autoload -U compinit % compinit % cd a # was mashing tab here to no avail (nor asdf) cd: no such file or directory: a % hash -d asdf=/etc % cd asdf/ # "cd a" now tab completes
(This was discovered by searching
zshoptions for "dir" and "cd" related strings.)
To turn this off disable one or more of those options (
unsetopt) or remove the variable(s) that the completion code is finding.
thrig has already mentioned in his answer, this was caused by
CDABLE_VARS option being set.
I had a similar issue and fixed it by adding
line to my
I ended up looking into
.zhistory and deleting all references to
lightdm this solved the problem for me. There maybe be other places zsh stores completions, but I don't know what they are.