Hi there, For those of you using bash-completion, please note that I've committed an updated port which works again with bash 4. There's a small change required to make it work however, which is changing . /usr/share/bash-completion/init_bc into . /etc/bash_completion in your login scripts. Cheers, Johannes -- Johannes Winkelmann mailto:jw@smts.ch Zurich, Switzerland http://jw.smts.ch
Johannes Winkelmann schrieb:
Hi there,
For those of you using bash-completion, please note that I've committed an updated port which works again with bash 4. There's a small change required to make it work however, which is changing . /usr/share/bash-completion/init_bc into . /etc/bash_completion in your login scripts.
IMHO there is a quoting error in _filedir() which prevents normal files to appear in the list for commands like ls, vi etc. (tested under 4.0.28). The attached patch should correct it. Regards, Bernd -- Bernd Eggink http://sudrala.de --- bash_completion 2009-08-02 10:18:56.000000000 +0200 +++ bash_completion.ok 2009-08-02 14:42:16.000000000 +0200 @@ -267,6 +267,7 @@ # _filedir() { + set -x local IFS=$'\t\n' xspec _expand || return 0 @@ -285,7 +286,7 @@ # bash-3.1. See also: # http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html toks=( ${toks[@]-} $( - compgen -d -- "$(quote_readline "$cur")" | { + compgen -d -- $(quote_readline "$cur") | { while read -r tmp; do echo $tmp done @@ -295,7 +296,7 @@ if [[ "$1" != -d ]]; then xspec=${1:+"!*.$1"} toks=( ${toks[@]-} $( - compgen -f -X "$xspec" -- "$(quote_readline "$cur")" | { + compgen -f -X "$xspec" -- $(quote_readline "$cur") | { while read -r tmp; do [ -n $tmp ] && echo $tmp done @@ -304,6 +305,7 @@ fi COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" ) + } # This function tries to parse the output of $command --help
Bernd Eggink schrieb:
Johannes Winkelmann schrieb:
Hi there,
For those of you using bash-completion, please note that I've committed an updated port which works again with bash 4. There's a small change required to make it work however, which is changing . /usr/share/bash-completion/init_bc into . /etc/bash_completion in your login scripts.
IMHO there is a quoting error in _filedir() which prevents normal files to appear in the list for commands like ls, vi etc. (tested under 4.0.28). The attached patch should correct it.
Sorry, forgot to remove a 'set -x'... Attached is the corrected patch. Bernd -- Bernd Eggink http://sudrala.de --- bash_completion 2009-08-02 10:18:56.000000000 +0200 +++ bash_completion.ok 2009-08-02 15:02:31.000000000 +0200 @@ -285,7 +285,7 @@ # bash-3.1. See also: # http://www.mail-archive.com/bug-bash@gnu.org/msg01667.html toks=( ${toks[@]-} $( - compgen -d -- "$(quote_readline "$cur")" | { + compgen -d -- $(quote_readline "$cur") | { while read -r tmp; do echo $tmp done @@ -295,7 +295,7 @@ if [[ "$1" != -d ]]; then xspec=${1:+"!*.$1"} toks=( ${toks[@]-} $( - compgen -f -X "$xspec" -- "$(quote_readline "$cur")" | { + compgen -f -X "$xspec" -- $(quote_readline "$cur") | { while read -r tmp; do [ -n $tmp ] && echo $tmp done
Johannes Winkelmann schrieb:
Hi there,
For those of you using bash-completion, please note that I've committed an updated port which works again with bash 4. There's a small change required to make it work however, which is changing . /usr/share/bash-completion/init_bc into . /etc/bash_completion in your login scripts.
Arghh... please ignore my previous posts. I was confused. The culprit isn't the quoting, but the quote_readline() function. See here: http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=... Johannes, could you correct this in the port? Regards, Bernd -- Bernd Eggink http://sudrala.de
participants (2)
-
Bernd Eggink
-
Johannes Winkelmann