Is this normal behavior for MacOS Big Sur ZSH (Z Shell) terminal? Sometimes shell commands such as find
and or launchd
as just a simple example execute properly. This is with the exclamation symbol "!" in front, leading with the expected output and no privilege escalation.
For example, running: !find /
will still work.
Or !sudo
will execute.
But !echo '@'
will not. But lead to the next command sometimes.
Output for !echo
zsh: event not found: echo
Output for !launchd
launchd
launchd cannot be run directly.
It seem's weird !sudo
outputs sudo syscallbypid.d
Best Answer
!str Refer to the most recent command starting with str. this is the history expansion behavior. type
and check 'Event Designators', you will get the answer