Temporarily change completion options

2008-03-17 Thread Mika Fischer
Hi, I'm currently working on the bash-completion package for Debian/Ubuntu. I'd like to know if it is possible to change the options of the programable completion within the completion function. An example would be to allow environment variables in place of filenames. But if I set -o filenames,

Re: Fwd: Problem with bash completion

2008-03-17 Thread Chet Ramey
Eric Blake wrote: This was originally reported on the cygwin lists; it is still present in stock bash 3.2.33. This has already been fixed for the next version. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer Live Strong. No day but today. Chet Ramey

Re: compgen and filenames

2008-03-17 Thread Chet Ramey
Jonas Diemer wrote: I have already tried the "-o filenames" option to compgen, with no success. Is what I want at all possible with the current bash (I used GNU bash, version 3.2.25(1)-release (i486-pc-linux-gnu) from KUbuntu 7.10)? If not, can you fix it (e.g. by improving the "-o filename

Re: compgen gets confused when trying to complete ambiguous special char

2008-03-17 Thread Chet Ramey
Mika Fischer wrote: Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share

Re: compgen gets confused when trying to complete ambiguous special char

2008-03-17 Thread Mika Fischer
* Chet Ramey <[EMAIL PROTECTED]> [2008-03-17 18:47]: > For historical reasons, complete/compgen dequote the filename they're > passed, removing backslash escapes and interpreting embedded quoted > substrings. Yes. I've run into this problem now several times while trying to fix the bugs in bash_co

Re: compgen gets confused when trying to complete ambiguous special char

2008-03-17 Thread Chet Ramey
Mika Fischer wrote: * Chet Ramey <[EMAIL PROTECTED]> [2008-03-17 18:47]: For historical reasons, complete/compgen dequote the filename they're passed, removing backslash escapes and interpreting embedded quoted substrings. Yes. I've run into this problem now several times while trying to fix t

document export x=1 y=$x

2008-03-17 Thread jidanni
On the man page at section "export", mention that the latter below will not do what one expects, as here revealed: $ set -x $ a=1 b=$a + a=1 + b=1 $ export x=1 y=$x + export x=1 y= + x=1 + y= Yes I'm sure it is mentioned elsewhere on the page but you might want to drum it home again here. Maybe als

Re: compgen gets confused when trying to complete ambiguous special char

2008-03-17 Thread Mika Fischer
* Chet Ramey <[EMAIL PROTECTED]> [2008-03-17 22:57]: >> Can you elaborate on the differences in case they're the cause of other >> strange behaviours? > > 1. Backslashes should not be stripped within single quotes. > > 2. Backslashes should only be stripped within double quotes if they're > f

Re: Temporarily change completion options

2008-03-17 Thread Chet Ramey
Mika Fischer wrote: Hi, I'm currently working on the bash-completion package for Debian/Ubuntu. I'd like to know if it is possible to change the options of the programable completion within the completion function. Not currently. I'm thinking about a new builtin that would accept the same se