bug-bash
[Top][All Lists]
Advanced

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

!; is interpreted as an history expansion that can never match anything


From: Emanuele Torre
Subject: !; is interpreted as an history expansion that can never match anything
Date: Tue, 8 Aug 2023 07:43:57 +0200
User-agent: Mutt/2.2.10 (2023-03-25)

! followed by a ; or another terminator  is interpreted as an history
expansion with no pattern that can never match anything.

  $ !; echo hi
  bash: !: event not found
  $ !&& echo hi
  bash: !: event not found

It should not be intepreted as a history expansion that cannot possibly
match anything; it should work the same it works if there is a space
after `!', or if histexpand is off.

  $ ! ; echo "$?" hi
  1 hi
  $ ! && echo hi
  bash: syntax error near unexpected token `&&'

o/
 emanuele6



reply via email to

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