Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15613
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: Issues with history substitution and its documentation |
| Date | 2019-11-19 10:11 -0500 |
| Message-ID | <mailman.1969.1574176305.13325.bug-bash@gnu.org> (permalink) |
| References | (1 earlier) <CA+VKLw_XMx1xjiFt-Tio8S+Mdt_AeS9v64SuMYYMdDdDnJFSBQ@mail.gmail.com> <CA+VKLw_hceb_xzu7kzTJAVuegWzqxJDa8xw4ja5TOBPpOWvRDQ@mail.gmail.com> <643b95db-ca1f-98ff-e8c5-c79581d909d4@case.edu> <CA+VKLw-VxEe+GxvQXbTOB09HHsoqXp+6vy1z27PXeH2FgQge_w@mail.gmail.com> <0b5c5bcb-27e2-6e59-40d9-0968f814d52b@case.edu> |
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 chet@case.edu http://tiswww.cwru.edu/~chet/
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: Issues with history substitution and its documentation Chet Ramey <chet.ramey@case.edu> - 2019-11-19 10:11 -0500
csiph-web