bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shell-expand-line removes quotes from alias expansion


From: Chet Ramey
Subject: Re: shell-expand-line removes quotes from alias expansion
Date: Sat, 28 Apr 2007 14:22:02 -0400
User-agent: Thunderbird 2.0.0.0 (Macintosh/20070326)

mw-u2@gmx.de wrote:
> Configuration Information [Automatically generated, do not change]:
> Machine: i386
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
> -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-pc-linux-gnu' 
> -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
> -DHAVE_CONFIG_H  -I.  -I../bash -I../bash/include -I../bash/lib  -g -O2
> uname output: Linux kleist 2.6.17-2-686 #1 SMP Thu Aug 31 12:53:18 UTC 2006 
> i686 GNU/Linux
> Machine Type: i386-pc-linux-gnu
> 
> Bash Version: 3.0
> Patch Level: 16
> Release Status: release
> 
> Description:
>         IMHO shell-expand-line expands some aliases to a different command 
> than
>         the command executed by the unexpanded alias.
> 
>         I think that shell-expand-line wrongly removes quotes when expanding
>         aliases which renders the expanded version unusable under certain
>         circumstances.

shell-expand-line performs history and alias expansion, then all of the
shell word expansions.  One of the word expansions is quote removal, which
causes the single quotes to be removed.

Bash provides two bindable readline commands that are probably closer
to what you want:  alias-expand-line and history-and-alias-expand-line.
Try binding one of those and see if it's closer to what you want.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                       Live Strong.  No day but today.
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]