Re: history fails with - in string

2023-04-13 Thread Martin D Kealey
"Word" means something different in history expansion than it does in the rest of the shell, because it happens before the normal lexical processing. In effect, it means the same as an identifier in C. A history expansion consists of a line selector (!cmdname) optionally followed by colon and a wo

history fails with - in string

2023-04-13 Thread James Cloos
with bash-5.0.3, !foo-b reports b bash: b: command not found even when foo-bar is in history. there is nothing in the history expansion sectio of the man page which would eve suggest that - cannot be part of string. -JimC -- James Cloos OpenPGP: 0x997A9F17ED7DAEA6