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


Groups > gnu.bash.bug > #15603

Re: Issues with history substitution and its documentation

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Issues with history substitution and its documentation
Date 2019-11-18 10:51 -0500
Message-ID <mailman.1856.1574092309.13325.bug-bash@gnu.org> (permalink)
References <CA+VKLw-WX8zUz06MZ9ThuMhUuW97aJ5ted8oSfJSvrVJBLW3hA@mail.gmail.com> <CA+VKLw_XMx1xjiFt-Tio8S+Mdt_AeS9v64SuMYYMdDdDnJFSBQ@mail.gmail.com> <e1ef2c0b-532f-d6c6-95d2-ed4bf7da39cb@case.edu>

Show all headers | View raw


On 10/10/19 10:35 PM, Jim Monte wrote:

> There is an inconsistency with the documentation and behavior of the ^ word
> designator. According to documentation, it refers to the first argument but
> does not require a ':' before it if it starts the word designator. However,
> it does not act like the numerical word designator 1 at the end of a range.

Thanks for the report. This is a bug.

> 
> [root@localhost ~]# echo a b c
> a b c
> [root@localhost ~]# echo !!:1-1
> echo a
> a
> [root@localhost ~]# echo a b c
> a b c
> [root@localhost ~]# echo !!:^-^
> echo a b^
> a b^
> 
> Also it is not explicitly documented that :- is equivalent to :0-

Thanks, I'll add a note to the documentation.

-- 
``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


Thread

Re: Issues with history substitution and its documentation Chet Ramey <chet.ramey@case.edu> - 2019-11-18 10:51 -0500

csiph-web