Recently I typed at my terminal
username:~$ !!
and got error from bash:
bash: !!: command not found
At the same time, it succeeds when done under superuser.
I investigated my user's PATH's content and found nothing suspicious:
/home/username/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Here is output of:
username:~$ history | tail
1993 date
1994 cal
1995 vcal
1996 uptime
1997 uname
1998 uptime
1999 uname
2000 uptime
2001 uname
2002 history | tail
Another:
username:~$ echo foo
foo
username:~$ !!
bash: !!: command not found
echo foo
and then!!
? Also, please edit your question and add the output ofhistory | tail
or so. Does your shell session have any history?histexpand
set in your shell options? what is the output ofecho $-
?!
literals not being honored without extra quoting was a much more common occurrence than finding someone who wanted history expansion functionality not available in easier-to-use form through readline.