It seems that if I remove the "-o filenames" from the compspec for cd, I
get the correct behavior when it comes to environment variables as
arguments to cd.

vnix$ complete -p cd
complete -o filenames -o nospace -F _cd cd

vnix$ cd $HOM<TAB>
vnix$ cd \$HOME
bash: cd: $HOME: No such file or directory

vnix$ complete -o nospace -F _cd cd

vnix$ cd $HOM<TAB>
vnix$ cd $HOME

vnix$

See also bug 177243, although its author seems to be insisting that it's
not a duplicate of this one.

-- 
bash tab complete faulty where filename starts with $
https://bugs.launchpad.net/bugs/19364
You received this bug notification because you are a member of Ubuntu
Bugs, which is a direct subscriber.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to