$!
to repeat a command from the bash history. Fortunately it only launched a Python server. But finally you could accidentally hit any command from your past. It's like playing the lottery :-P
1–10 of 54 posts
$!
to repeat a command from the bash history. Fortunately it only launched a Python server. But finally you could accidentally hit any command from your past. It's like playing the lottery :-P
Over time, I got better at noticing danger areas. Whenever I use 'rm', I re-read the command a couple of times as an extra precaution. Doesn't feel like that's enough.
I wish we had --dry-run for everything.
Fortunately my memory was never good enough for me to use that facility. C-r is how I always lookup earlier commands.
"\e[A": history-search-backward
"\e[B": history-search-forward
to my .inputrc, I find it easier to use than C-r as it's some sort of autocomplete from history. But looking up commands with !number can still be very useful when you don't remember the command you need but remember when you used it (e.g. what commands you ran before and after).I never understood the utility of history substitution (I think this is what it's called). Why not just ctrl-r to see the actual command? Also, `sudo !!` thingy that is (was?) persistent in the internets for some reason, is probably the dumbest thing out there.
I never understood the utility of history substitution (I think this is what it's called). Why not just ctrl-r to see the actual command? Also, `sudo !!` thingy that is (was?) persistent in the internets for some reason, is probably the dumbest thing out there.
I don't use the terminal often, but when I do, the feeling of sheer power and control over the system is palpable. I'm a fast and nervous typer, so I always try to slow down and notice all the ways I could lose data, and how easy it would be to make such mistakes (eg. how many mistyped letters away from wiping my database am I?). Over time, I got better at noticing danger areas. Whenever I use 'rm', I re-read the com…
Someone tell me what the zsh equivalent is?