[Bash-completion-devel] Bug#560851: Bug#560851: bash-completion: completion doesn't works if file name has an apostrophe
Freddy Vulto
fvulto at gmail.com
Sun Dec 13 21:39:28 UTC 2009
On 091212 20:38, skizzhg wrote:
> if I try with "ls" or "mv" then <TAB> to obtain the file list inside,
> it doesn't complete anything
>
> ~$ ls Pills\ \'n\'\ Thrills\ and\ Bellyaches/<TAB>
I think there's a bug in `compgen -f' if a directory contains a single
or double quote. I asked the bug-bash mailing list, see:
http://www.mail-archive.com/bug-bash@gnu.org/msg06684.html
We need to look into this and probably apply the workarounds below to
_filedir().
Excerpt from bug-bash mail:
---8<--------------------------------------------------------
So, these are the workarounds:
$ ls a\'b/ # For reference, works on both bash-3 & bash-4
c
$ compgen -f a\\\'b/ # Workaround for bash-4
a\'b/c
$ compgen -f a\\\\\\\'b/ # Workaround for bash-3
a\'b/c
---8<--------------------------------------------------------
Regards,
Freddy Vulto
http://fvue.nl
More information about the Bash-completion-devel
mailing list