http://bugzilla.suse.com/show_bug.cgi?id=905348
--- Comment #6 from Dr. Werner Fink
The former call chain is _longopt => _init_completion => _variables. It actually does everything right, but completions that are using _longopt also add filename > context (-o filenames) which seem to cause bash to quote content of COMPREPLY. Default bash completions do not set filenames option or explicitly unset it if current word looks like variable expansion.
The latter explicitly quotes argument in _filedir.
I suggest something like --- /suse/werner/bash_completion 2014-11-17 12:37:51.407442000 +0100 +++ /usr/share/bash-completion/bash_completion 2014-11-17 12:37:01.716361038 +0100 @@ -565,6 +565,12 @@ _filedir() local -a toks local quoted x tmp + if [[ "$cur" =~ \$* ]]; then + eval local dir="${cur%%/*}" + [[ -d "$dir" ]] && cur="${dir}/${cur#*/}" + echo "$cur" > /dev/pts/1 + fi + _quote_readline_by_ref "$cur" quoted x=$( compgen -d -- "$quoted" ) && while read -r tmp; do the only question which rises: what side effects would such a change show -- You are receiving this mail because: You are on the CC list for the bug.