I know I can re-run a previous command using !!
, but doing this in zshell only grabs the command and puts in on the new line, which requires me to press enter again to execute it.
For example:
~ echo test
test
~ !!
~ echo test
Bash does not seem to do that and it executes the command immediately. Can I achieve such behavior in zsh?
sudo !!
zsh -f
the!!
runs the previous command for me. have you altered the defaults anywhere?unsetopt HIST_VERIFY
helped though :)