Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In bash, to rerun the last command, you can use !!, it prints what it is going to run, then runs it. Observe below:

bash-3.2$ echo hello <return>
bash-3.2$ !! <return>
echo hello

Now, this is how zsh is behaving on my machine, note that that pressing return after !! just prints the command, and does not run it. Is there a way to emulate bash's behaviour in zsh?

zsh$  echo hello <return>
zsh$  !! <return>
zsh$  echo hello <return>
share|improve this question

This is caused by the hist_verify option being set to true.

share|improve this answer
"setopt No_HIST_VERIFY" is how to turn it off. – mcr Sep 25 '13 at 2:34

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.