I gather that bash has a "magic space" function, where if I do e.g. sudo !!<space>
it will blow in sudo ./my_last_command
. Does something similar exist in fish?
1 Answer
From the FAQ in the source (I can't find any documentation online):
Why doesn't history substitution ("!$" etc.) work?
Because history substitution is an awkward interface that was invented before interactive line editing was even possible. Fish drops it in favor of perfecting the interactive history recall interface. Switching requires a small change of habits: if you want to modify an old line/word, first recall it, then edit. E.g. don't type "sudo !!" - first press Up, then Home, then type "sudo ".
-
4That's hilarious. The only reason I use
sudo !!
is because it's faster and more convenient than the "interactive" way. Jan 27, 2011 at 23:37 -