Bugs item #313199, was changed at 2011-06-30 15:52 by Andrew Russell You can respond by visiting: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313199&group_id=100114
Status: Open Priority: 3 Submitted By: Nobody (None) Assigned to: Nobody (None) Summary: Completion for the `cd` command does not expand variables. Distribution: --Distribution-Agnostic-- Originally reported in: None Milestone: None Status: None Original bug number: Initial Comment: Anonymous message posted by deadhead.russ...@gmail.com Currently, bash_completion will auto complete variables for the `cd` command. However, these variables are not expanded making auto-completion not work for the remainder of the command. Example: Lets say I have a variable, `$variable` which is `/path/to` and I have the folder structure, `/path/to/directory/`. cd $variable/direct<TAB> currently does nothing. I expect it to expand the variable and complete it to: cd /path/to/directory/ I have created a patch where variables are still auto completed. However, if only one match is returned, the matched variable is expanded and the completion continues. ---------------------------------------------------------------------- Comment By: Andrew Russell (deadhead-guest) Date: 2011-07-01 16:44 Message: I have modified the patch slightly such that auto-completing of variables that returns no matches does not auto-complete to the empty string. This changes the following line: + if [[ "${#variables[1]}" -ne 0 ]]; then To this new line: + if [[ "${#variables[1]}" -ne 0 ]] || [[ "${#variables[@]}" -eq 0 ]]; then ---------------------------------------------------------------------- You can respond by visiting: https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=313199&group_id=100114 _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel