General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
Lawrence D’Oliveiro
Mental Outlaw
comments
Comments by "Lawrence D’Oliveiro" (@lawrencedoliveiro9104) on "Shell Tricks to Save Time in Linux" video.
7:18 This kind of cleverness can get dangerous, though. What if it substitutes the wrong thing? Beyond a certain point, you would really like the option of confirming what it is going to do, before doing it. Found a fix: do “shopt -s histverify”, then instead of immediately executing the substitution, it presents it to you in the readline buffer, so you can edit it before pressing Enter to execute the result.
12
5:53 There is also a generalization of this. Whereas !«str» selects the last command beginning with «str», you can use !?«str»? to match the last command containing «str» somewhere in it. You can put spaces in «str», too.
5
6:29 The default in readline is to use Emacs key bindings. So rather than switching to Vim key bindings, you can use Alt-B to move back a word, or Alt-F to move forward a word. Unfortunately this doesn’t work so well with GNOME terminal, because Alt-F there brings up the File menu. Other terminal apps don’t seem to have this problem.
3
1:55 This is why I always have a separate root terminal session open somewhere. On top of, you know, the 2 dozen or so terminal sessions I have open under my own user.
2
You must have “shopt histverify” set.
1