bug-bash
[Top][All Lists]
Advanced

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

Re: Issues with history substitution and its documentation


From: Chet Ramey
Subject: Re: Issues with history substitution and its documentation
Date: Tue, 19 Nov 2019 10:11:39 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.2.2

On 11/18/19 1:10 PM, Jim Monte wrote:
Thanks again for looking at these reports. I have thankfully essentially completed my implementation of history for ngspice (an open-source successor to SPICE 3F5 with a csh-like front end that handles parsing a bit differently than a shell would), so I believe this report will be the final one.

Jim

Related to the other report, there is some more missing documentation regarding the :s word modifier.

If the line ends after "old", it is equivalent to :s/old/new/ (assuming old and new do not contain '/').

Well, if `new' is null, the instances of `old' are deleted. That's
consistent with other history expansions. You can already omit the
trailing delimiter if that ends the line.


[root@localhost ~]# echo !:s
echo echo a b c
echo a b c

Technically, that's a bad substitution (csh throws an error), since it's
missing the delimiter. The readline code just lets it go; that's one of
the few places it's less strict than csh.

Chet

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



reply via email to

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