Remix.run Logo
Joker_vD 3 hours ago

sigh The usability of ! versus Ctrl+R in a shell is pretty much the same as the usability of ed versus vi, or moving files around using cp/mv versus using Midnight Commander or the like: in the first case, you have to accurately remember the past (which for many people is pretty difficult); in the second case, you don't have to, because you always have an immediate view of the state of the system and the preview of the effect you're about to incur.

And yeah, I've done editing with ed; it definitely beats "cat >file.txt" and copying parts around with head/tail and retyping the corrections manually, sure, and it works in every environment that can take line-oriented input from the user (so, literally everywhere), but that's about as much praise as I can give it.

refp a few seconds ago | parent | next [-]

[delayed]

Terr_ 3 hours ago | parent | prev [-]

> in the first case, you have to accurately remember the past

Right, as a matter of (relatively trivial) cybernetics between man and machine, it rests on the weaker parts of the human.

TBF, it'd make a lot more sense if every command on screen (or given the timescale perhaps teletype paper prinout) was already labeled with the necessary number.

petschge 2 hours ago | parent [-]

You can just add something like (\\!) in your PS1 and get just that.

PS1="(\\!) \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ "

as a full working example