Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11842

Re: shell-expand-line drops quotation marks

Path csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail
From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: shell-expand-line drops quotation marks
Date Fri, 6 Nov 2015 08:12:35 -0500
Lines 24
Approved bug-bash@gnu.org
Message-ID <mailman.1828.1446815567.7904.bug-bash@gnu.org> (permalink)
References <CAAHpriOiAksOZSinXeZTnXtqT6fN0TsLuDNCW5QRY4ox-crihQ@mail.gmail.com> <563A0C7A.8030504@case.edu> <563A1A14.5060609@draigBrady.com> <CAAHpriMHm+d_w8gCLAJSn+kS-w2hf-es-23KMBaPHW1Ws2t_jw@mail.gmail.com>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1446815567 11528 208.118.235.17 (6 Nov 2015 13:12:47 GMT)
X-Complaints-To action@cs.stanford.edu
Cc Keith Thompson <Keith.S.Thompson@gmail.com>, bug-bash@gnu.org, chet.ramey@case.edu
To Keith Thompson <keithsthompson@gmail.com>, Pádraig Brady <P@draigbrady.com>
Envelope-to bug-bash@gnu.org
X-Enigmail-Draft-Status N1110
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
In-Reply-To <CAAHpriMHm+d_w8gCLAJSn+kS-w2hf-es-23KMBaPHW1Ws2t_jw@mail.gmail.com>
X-Mirapoint-Virus-RAPID-Raw score=unknown(0), refid=str=0001.0A020206.563CA744.011D,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46
X-Mirapoint-Loop-Id e1e39993721b72c041b3cf82e738c959
X-Junkmail-Whitelist YES (by domain whitelist at mpv1-2015.case.edu)
X-Mirapoint-Virus-RAPID-Raw score=unknown(0), refid=str=0001.0A020204.563CA744.01E7,ss=1,re=0.000,fgs=0, ip=0.0.0.0, so=2015-08-12 04:07:17, dmn=2011-05-27 18:58:46
X-Mirapoint-Loop-Id 861d6874c341b665e1f9b0db406774ec
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy]
X-Received-From 129.22.103.226
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11842

Show key headers only | View raw


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.

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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: shell-expand-line drops quotation marks Chet Ramey <chet.ramey@case.edu> - 2015-11-06 08:12 -0500

csiph-web