Remix.run Logo
hnlmorg 30 minutes ago

I’ve been burnt before using ! and forgetting what command I typed previously, thus invoking the wrong command line.

!! is handy for the sudo example, but beyond that, I tend to prefer pressing the up arrow to cycle through the history rather than picking the first item. Eg:

  !ssh
vs

  ssh[up]

It’s the same number of key strokes but less error prone
CoastalCoder 16 minutes ago | parent [-]

Agreed. I especially cringed at the author's example of mixing that with "sudo".

refp 12 minutes ago | parent [-]

the "mixing of sudo"-example is using `!!`, which as explained is the immediately previous command, a little confused how that translates to the "execute command somewhere in the history" argument?