Re: bash tab variable expansion question?

2012-06-11 Thread John Embretsen
On 27 Feb 2011 18:18:24 -0500, Chet Ramey wrote: On Sat, Feb 26, 2011 at 10:49 PM, gnu.bash.bug address@hiddenwrote: A workaround is fine but is the 4.2 behavior bug or not? It's a more-or-less unintended consequence of the requested change Eric Blake referred to earlier in the thread.

Re: bash tab variable expansion question?

2012-06-11 Thread Pierre Gaston
On Mon, Jun 11, 2012 at 10:59 AM, John Embretsen john...@gmail.com wrote: On 27 Feb 2011 18:18:24 -0500, Chet Ramey wrote: On Sat, Feb 26, 2011 at 10:49 PM, gnu.bash.bug address@hiddenwrote: A workaround is fine but is the 4.2 behavior bug or not? It's a more-or-less unintended consequence of

Re: bash tab variable expansion question?

2012-06-11 Thread John Embretsen
On 06/11/2012 10:10 AM, Pierre Gaston wrote: On Mon, Jun 11, 2012 at 10:59 AM, John Embretsenjohn...@gmail.com wrote: On 27 Feb 2011 18:18:24 -0500, Chet Ramey wrote: On Sat, Feb 26, 2011 at 10:49 PM, gnu.bash.bugaddress@hiddenwrote: A workaround is fine but is the 4.2 behavior bug or not?

Re: bash tab variable expansion question?

2012-06-11 Thread Roman Rakus
On 06/11/2012 11:07 AM, John Embretsen wrote: On 06/11/2012 10:10 AM, Pierre Gaston wrote: On Mon, Jun 11, 2012 at 10:59 AM, John Embretsenjohn...@gmail.com wrote: On 27 Feb 2011 18:18:24 -0500, Chet Ramey wrote: On Sat, Feb 26, 2011 at 10:49 PM, gnu.bash.bugaddress@hiddenwrote: A workaround

Re: bash tab variable expansion question?

2012-03-07 Thread Chet Ramey
On 3/5/12 5:43 PM, Sebastian Siebert wrote: Hi Chet, thank you to point me out to the correct patch. :-) I will used this patch for the bash 4.2 + PL 20. I've attached the latest version of the direxpand patch, and an additional patch (direxpand-relpath) that is the first cut at avoiding

Re: bash tab variable expansion question?

2012-03-05 Thread Sebastian Siebert
Am 02.09.2011 21:32, schrieb Chet Ramey: On 2/24/11 5:14 PM, Michael Kalisz wrote: Bash Version: 4.2 Patch Level: 0 Release Status: release Description: Hi! Example: In bash, version 4.1.5(1)-release: $ echo $PWD/TAB will expand the $PWD variable to your current directory while in bash,

Re: bash tab variable expansion question?

2012-03-05 Thread Chet Ramey
On 3/5/12 2:07 PM, Sebastian Siebert wrote: Thanks for the great patch. I have applied your patch in our bash 4.2 + Patchlevel 20. It is solved an issue with variable expansion. But on the other side bash completion is broken. :-( Bash completion with local file (./some_script.sh, e.g.)

Re: bash tab variable expansion question?

2012-03-05 Thread Sebastian Siebert
On 05.03.2012 21:28, Chet Ramey wrote: On 3/5/12 2:07 PM, Sebastian Siebert wrote: Thanks for the great patch. I have applied your patch in our bash 4.2 + Patchlevel 20. It is solved an issue with variable expansion. But on the other side bash completion is broken. :-( Bash completion with

Re: bash tab variable expansion question?

2011-11-23 Thread Chet Ramey
On 10/17/11 3:07 PM, Michael Kalisz wrote: Hi Chet, The shopt direxpand feature works as advertised (Thanks!) except that I noticed it seems to break the name-completion of executables which are not in you path. Yes, it expands the directory name. In this case, it expands `.' to

Re: bash tab variable expansion question?

2011-10-19 Thread Chet Ramey
On 10/17/11 3:07 PM, Michael Kalisz wrote: Hi Chet, The shopt direxpand feature works as advertised (Thanks!) except that I noticed it seems to break the name-completion of executables which are not in you path. This turns out to be a problem with `./' and `../' and every other case in

Re: bash tab variable expansion question?

2011-10-17 Thread Michael Kalisz
Hi Chet, The shopt direxpand feature works as advertised (Thanks!) except that I noticed it seems to break the name-completion of executables which are not in you path. Example: (colortable16.sh is a script and executable) $ ll colortable16.sh -rwxr-xr-x 1 user group 1458 2009-12-03 19:18

Re: bash tab variable expansion question?

2011-10-17 Thread Chet Ramey
On 10/17/11 3:07 PM, Michael Kalisz wrote: Hi Chet, The shopt direxpand feature works as advertised (Thanks!) except that I noticed it seems to break the name-completion of executables which are not in you path. Yes, it expands the directory name. In this case, it expands `.' to $PWD, and

[Bug Still Unfixed] Re: bash tab variable expansion question?

2011-09-15 Thread Roger
When entering $HOME/ and TAB KEY to perform tab completion readline gets overwritten with: $ \$HOME/ Following thread describes the problem for bash-4.2: http://lists.gnu.org/archive/html/bug-bash/2011-02/msg00296.html My current version in Gentoo and which are the latest available sources with

Re: [Bug Still Unfixed] Re: bash tab variable expansion question?

2011-09-15 Thread Chet Ramey
On 9/15/11 5:53 PM, Roger wrote: When entering $HOME/ and TAB KEY to perform tab completion readline gets overwritten with: $ \$HOME/ Read the discussion including http://lists.gnu.org/archive/html/bug-bash/2011-09/msg00012.html -- ``The lyf so short, the craft so long to lerne.'' -

Re: bash tab variable expansion question?

2011-09-07 Thread Chet Ramey
complete -o default -F _longopt ls Thanks Chet. The following does give me Variable Bash Completion: complete -o bashdefault -F _longopt ls You might want both -o bashdefault and -o default. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa,

Re: bash tab variable expansion question?

2011-09-06 Thread Chet Ramey
On 9/4/11 9:51 PM, Clark J. Wang wrote: Tested with 4.2.10. Overall it works fine for me. But it still has problem for following scenario: $ complete -d -o bashdefault cd $ cd $PWDTAB # it expands to this: $ cd \$PWDSPACE Bash 4.1 also behaves like that so I'm not sure if it's OK. Out

Re: bash tab variable expansion question?

2011-09-06 Thread Chet Ramey
On 9/5/11 4:40 AM, Roger wrote: The option works, as far as I can see. ls $HOM completes to ls $HOME instead of ls $HOME/, though. This is not going to work until I do something else. Readline decides whether or not to append a slash to a directory name, and it doesn't know that $HOME is a

Re: bash tab variable expansion question?

2011-09-06 Thread Chet Ramey
On 9/5/11 6:59 AM, Roger wrote: On Gentoo here, echo $HO does complete to echo $HOME, but ls $HO fails to complete here. (It is enabled here $ eselect bashcomp list |grep coreutils. Just to verify, I just wiped $HOME/.bash_completion.d/ and renabled everything and still no completion using

Re: bash tab variable expansion question?

2011-09-06 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 9/5/11 2:05 AM, Martin von Gagern wrote: On -10.01.-28163 20:59, Chet Ramey wrote: Bash-4.2 tries to leave what the user typed alone, but that leads to an inherently ambiguous situation: when do you quote the `$' in a filename (or, in this

Re: bash tab variable expansion question?

2011-09-06 Thread Roger
On Mon, Sep 05, 2011 at 02:59:20AM -0800, Roger wrote: On Mon, Sep 05, 2011 at 12:40:02AM -0800, Roger wrote: The option works, as far as I can see. ls $HOM completes to ls $HOME instead of ls $HOME/, though. Weird. On Gentoo here, echo $HO does complete to echo $HOME, but ls $HO fails to

Re: bash tab variable expansion question?

2011-09-05 Thread Martin von Gagern
On -10.01.-28163 20:59, Chet Ramey wrote: Bash-4.2 tries to leave what the user typed alone, but that leads to an inherently ambiguous situation: when do you quote the `$' in a filename (or, in this case, a directory name)? It could be a shell variable, and it could be a character in the

Re: bash tab variable expansion question?

2011-09-05 Thread Roger
The option works, as far as I can see. ls $HOM completes to ls $HOME instead of ls $HOME/, though. Weird. On Gentoo here, echo $HO does complete to echo $HOME, but ls $HO fails to complete here. (It is enabled here $ eselect bashcomp list |grep coreutils. Just to verify, I just wiped

Re: bash tab variable expansion question?

2011-09-05 Thread Roger
On Mon, Sep 05, 2011 at 12:40:02AM -0800, Roger wrote: The option works, as far as I can see. ls $HOM completes to ls $HOME instead of ls $HOME/, though. Weird. On Gentoo here, echo $HO does complete to echo $HOME, but ls $HO fails to complete here. (It is enabled here $ eselect bashcomp

Re: bash tab variable expansion question?

2011-09-04 Thread Clark J. Wang
On Sat, Sep 3, 2011 at 3:32 AM, Chet Ramey chet.ra...@case.edu wrote: The attached patch adds a new shell option that, when enabled, is intended to restore the bash-4.1 behavior of expanding directory names in filenames being completed. I have done some testing, and it seems to work the way

Re: bash tab variable expansion question?

2011-09-02 Thread Chet Ramey
On 2/24/11 5:14 PM, Michael Kalisz wrote: Bash Version: 4.2 Patch Level: 0 Release Status: release Description: Hi! Example: In bash, version 4.1.5(1)-release: $ echo $PWD/TAB will expand the $PWD variable to your current directory while in bash, version 4.2.0(1)-release:

Re: bash tab variable expansion question?

2011-02-27 Thread Clark J. Wang
On Sat, Feb 26, 2011 at 10:49 PM, gnu.bash.bug michael.kal...@gmail.comwrote: Wow...I'ts good workaround: $ cd /tmp $ echo ~+ /tmp Thanks Andreas! A workaround is fine but is the 4.2 behavior bug or not? //Michael On 26 Feb, 09:09, Andreas Schwab sch...@linux-m68k.org wrote:

Re: bash tab variable expansion question?

2011-02-27 Thread Michael Kalisz
2011/2/27 Clark J. Wang dearv...@gmail.com A workaround is fine but is the 4.2 behavior bug or not? I agree...Would be nice if someone could confirm if this is a bug or not? I'm betting that this is a bug :-) //Michael

Re: bash tab variable expansion question?

2011-02-27 Thread Chet Ramey
On 2/27/11 8:39 AM, Clark J. Wang wrote: On Sat, Feb 26, 2011 at 10:49 PM, gnu.bash.bug michael.kal...@gmail.comwrote: Wow...I'ts good workaround: $ cd /tmp $ echo ~+ /tmp Thanks Andreas! A workaround is fine but is the 4.2 behavior bug or not? It's a more-or-less unintended

Re: bash tab variable expansion question?

2011-02-26 Thread Andreas Schwab
gnu.bash.bug michael.kal...@gmail.com writes: What do you mean? ~-/. is no equal to $PWD If you want $PWD, you can use ~+/. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 And now for something completely

Re: bash tab variable expansion question?

2011-02-26 Thread gnu.bash.bug
Wow...I'ts good workaround: $ cd /tmp $ echo ~+ /tmp Thanks Andreas! //Michael On 26 Feb, 09:09, Andreas Schwab sch...@linux-m68k.org wrote: gnu.bash.bug michael.kal...@gmail.com writes: What do you mean? ~-/.  is no equal to $PWD If you want $PWD, you can use ~+/. Andreas. --

Re: bash tab variable expansion question?

2011-02-25 Thread Andreas Schwab
Eric Blake ebl...@redhat.com writes: On 02/24/2011 03:14 PM, Michael Kalisz wrote: $ echo $PWD/TAB will expand the $PWD variable to your current directory while in bash, version 4.2.0(1)-release: $ echo $PWD/TAB will just escape the $ in front of the $ variable i.e: $ echo \$PWD/

Re: bash tab variable expansion question?

2011-02-25 Thread Davide Brini
On Friday 25 Feb 2011 05:15:24 Eric Blake wrote: On 02/24/2011 03:14 PM, Michael Kalisz wrote: $ echo $PWD/TAB will expand the $PWD variable to your current directory while in bash, version 4.2.0(1)-release: $ echo $PWD/TAB will just escape the $ in front of the $ variable i.e:

Re: bash tab variable expansion question?

2011-02-25 Thread Clark J. Wang
On Fri, Feb 25, 2011 at 5:46 PM, Davide Brini dave...@gmx.com wrote: On Friday 25 Feb 2011 05:15:24 Eric Blake wrote: On 02/24/2011 03:14 PM, Michael Kalisz wrote: $ echo $PWD/TAB will expand the $PWD variable to your current directory while in bash, version 4.2.0(1)-release:

Re: bash tab variable expansion question?

2011-02-25 Thread Clark J. Wang
On Fri, Feb 25, 2011 at 1:15 PM, Eric Blake ebl...@redhat.com wrote: On 02/24/2011 03:14 PM, Michael Kalisz wrote: $ echo $PWD/TAB will expand the $PWD variable to your current directory while in bash, version 4.2.0(1)-release: $ echo $PWD/TAB will just escape the $ in front of the

Re: bash tab variable expansion question?

2011-02-25 Thread Greg Wooledge
On Fri, Feb 25, 2011 at 09:46:58AM +, Davide Brini wrote: Maybe, but then it shouldn't escape the $ either, as the OP is reporting for 4.2 (I don't have a 4.2 handy to test it). I actually noticed this quite recently, but didn't think to bring it up. I had just typed some cd command, and

Re: bash tab variable expansion question?

2011-02-25 Thread Andreas Schwab
Greg Wooledge wool...@eeg.ccf.org writes: Fortunately the workaround was simple enough -- once the filename had been completed I went back and x'ed out the \. Or use ~-/. Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276

Re: bash tab variable expansion question?

2011-02-25 Thread gnu.bash.bug
Look at the following example: # touch 'file name with a space' if I press # ll fileTAB then I get: # ll file\ name\ with\ a\ space -rw-r--r-- 1 root sys 0 Feb 25 13:10 file name with a space The backslash '\' which reminds me of: # cd /tmp # mkdir hello # cd

Re: bash tab variable expansion question?

2011-02-25 Thread gnu.bash.bug
What do you mean? ~-/. is no equal to $PWD On 25 Feb, 16:03, Andreas Schwab sch...@linux-m68k.org wrote: Greg Wooledge wool...@eeg.ccf.org writes: Fortunately the workaround was simple enough -- once the filename had been completed I went back and x'ed out the \. Or use ~-/. Andreas.

Re: bash tab variable expansion question?

2011-02-25 Thread Bob Proulx
gnu.bash.bug wrote: Andreas Schwab wrote: Greg Wooledge wrote: directory again, I typed cd $OLDPWD/fooTAB -- and the $OLDPWD became \$OLDPWD and did not do as I wished. Or use ~-/. What do you mean? ~-/. is no equal to $PWD No. But it is similar to $OLDPWD which is what Greg

bash tab variable expansion question?

2011-02-24 Thread Michael Kalisz
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/local/share/locale'