[Bash-completion-devel] Bug#498474: Bug#498474: TAB always outputs -sh: <( compgen -f -X -- '...' ): No such file or directory
David Paleino
d.paleino at gmail.com
Wed Sep 10 19:50:40 UTC 2008
tags 498474 unreproducible moreinfo
thanks
Ciao Lucio,
On Wed, 10 Sep 2008 12:28:49 +0200, Lucio Crusca wrote:
> Whenever I type a prefix and then hit TAB, I see the folowing on the console:
>
> -sh: <( compgen -d -- 'Mai' ): No such file or directory
> -sh: <( compgen -f -X -- 'Mai' ): No such file or directory
That "-sh" is looking weird to me.
If you look at the source code, those lines should be in the _filedir() function
(marked with *):
_filedir()
{
local IFS=$'\t\n' xspec
_expand || return 0
local toks=( ) tmp
while read -r tmp; do
[[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
* done < <( compgen -d -- "$(quote_readline "$cur")" )
if [[ "$1" != -d ]]; then
xspec=${1:+"!*.$1"}
while read -r tmp; do
[[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
* done < <( compgen -f -X "$xspec" -- "$(quote_readline "$cur")" )
fi
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
}
As you can see, that "-sh" is not appearing anywhere.
Did you hack our code? ;) :P
> where Mai is the prefix I've keyed in.
> The output of ls is:
>
> $ ls
> log Maildir
>
> The bug happens with any command, be it "cd Mai<TAB>", "rm -rf Mai<TAB>", "ls
> Mai<TAB>" or others. It happens even when there's no file starting with the
> prefix.
>
> I think the bug is a grave one because my bash-completion is actually
> unusable.
I'm sorry but... well... I just can't reproduce it:
$ pwd
/tmp
$ mkdir bug
$ cd bug/
$ pwd
/tmp/bug
$ touch log; mkdir Maildir
$ cd Mai<TAB>
$ cd Maildir/^C
$ rm -rf Mai<TAB>
$ rm -rf Maildir/^C
$ ls Mai<TAB>
$ ls Maildir/^C
$
My suggestion here is to try reinstalling bash-completion:
# apt-get --reinstall install bash-completion
Hope this helps,
David
--
. ''`. Debian maintainer | http://wiki.debian.org/DavidPaleino
: :' : Linuxer #334216 --|-- http://www.hanskalabs.net/
`. `'` GPG: 1392B174 ----|---- http://snipr.com/qa_page
`- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20080910/e4e56c8f/attachment-0002.pgp
More information about the Bash-completion-devel
mailing list