[Bash-completion-devel] Bug#628123: Bug#628123: bash-completion: Add cd for longopt completion
ville.skytta at iki.fi
Mon May 30 18:28:16 UTC 2011
On 05/27/2011 03:46 PM, Luca Bruno wrote:
> I'd like to ask for adding "cd" to the list of commands such that _longopt
> is used: complete -F _longopt -o default cd
Simply doing that would break the $CDPATH completion we currently have
for cd. And _longopt isn't really the right thing to do as AFAIK cd
does not have any long options.
> Several commands are present such as ls, but cd is not present. This
> completion allows completing variables containing directory names like cd
I'm not sure I understand correctly what you're looking for (please post
a complete example if my guess is not correct), but it does complete
variable names for me.
$ export mydir=/tmp
$ cd $my<TAB> # completes to "cd $mydir"
More information about the Bash-completion-devel