News for hackers. Stuff that matters.
Re:Advancing in the Bash Shell by benvd on Tuesday September 13, 2016 @03:18AM (#12486169)
>I don't use !!, or !$, because I prefer to see what command is being executed before I press enter.

I use zsh (with oh-my-zsh) and when I type e.g. "sudo !!" and press enter, it doesn't execute the command, instead it expands the !!. Another enter will then actually execute it.

I believe it's default behavior for oh-my-zsh. At least, I don't recall manually changing this.

Re:Advancing in the Bash Shell by posterboy on Tuesday September 13, 2016 @09:12AM (#12487848)
This is achieved in bash by shopt -s histverify

I don't use history expansions, though, so YMMV

Re:Advancing in the Bash Shell by jandrese on Tuesday September 13, 2016 @02:10PM (#12490803)
In zsh you can type !!<tab> and it will auto-expand the line for you. I find histverify to be kind of annoying so I don't use it.
Re:Advancing in the Bash Shell by Something1234 on Friday September 16, 2016 @10:55AM (#12514397)
How so?
Re:Advancing in the Bash Shell by rdc12 on Tuesday September 13, 2016 @08:22AM (#12487463)
I think by default in vanilla zsh, will expand something like 'sudo !!' by hitting tab after the second bang.
Re:Advancing in the Bash Shell by HeadlessChild on Tuesday September 13, 2016 @05:27AM (#12486612)
You are correct.
Re:Advancing in the Bash Shell by ssebastianj on Tuesday September 13, 2016 @10:25AM (#12488497)
Same behavior on zsh with prezto.