[Top][All Lists]

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

Re: shell-expand-line drops quotation marks

From: Keith Thompson
Subject: Re: shell-expand-line drops quotation marks
Date: Fri, 6 Nov 2015 08:41:09 -0800

And today I learned that there's an "undo" command!  (It's bound to
Ctrl-X Ctrl-U and to Ctrl-_ by default.)  Thanks, that's incredibly useful.

I still can't think of a case where I'd want quote removal, which changes
the meaning of the line, but I don't have to use it.

On Fri, Nov 6, 2015 at 5:12 AM, Chet Ramey <address@hidden> wrote:
On 11/4/15 1:48 PM, Keith Thompson wrote:
> Thanks, I didn't know about history-expand-line.
> Is there some case where shell-expand-line would actually be useful?
> If I've typed *"foo bar"*, I can't think of any case where I'd *want*
> it to be replaced by *foo bar*, which has a very different meaning.
> Of course the obvious answer is not to use it, but I'm wondering why
> it's there.

Sure, when you want to expand aliases or variables in the command before
executing it.  It's only the quote removal that you -- in this case --
don't want.  You can also undo the word expansions after viewing them,
restoring the quoted strings.

There are separate bindable commands for history expansion, alias
expansion, and history-and-alias expansion.  If you don't want the
rest of the word expansions, you can easily rebind the commands.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

Keith Thompson <address@hidden>

reply via email to

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