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


Groups > gnu.bash.bug > #15603 > unrolled thread

Re: Issues with history substitution and its documentation

Started byChet Ramey <chet.ramey@case.edu>
First post2019-11-18 10:51 -0500
Last post2019-11-18 10:51 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#15603 — Re: Issues with history substitution and its documentation

FromChet Ramey <chet.ramey@case.edu>
Date2019-11-18 10:51 -0500
SubjectRe: Issues with history substitution and its documentation
Message-ID<mailman.1856.1574092309.13325.bug-bash@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web