today i learned that commands starting with a space don't go into your history. amazing!
-
-
-
I’m so glad :D
-
also: i miss you. hope you're doing well.
-
I am! I feel lucky that I got to work with you :))
-
Be a little careful it depends on the value of the HISTCONTROL env var being set right.
- 1 more reply
New conversation -
-
-
There’s probably a dozen ways to solve this Q (I’d normally use sed), but for the lower left example I’m pretty sure the resulting filename would be image.png.jpg. Is there a better way than sed to replace the extension instead of adding it? Or can convert natively do it?
-
yeah you can do this weird thing where bash does the substitution! ${i/png/jpg/} or something
-
Or ${i%png}jpg
-
Also 'basename'
-
Basename would need $(), so it'll spawn a costly subshell
-
I'm a sysadmin. Shells are my currency. I'll spend them as I like.
- 1 more reply
New conversation -
-
-
the !! thing is why I love aliasing sudo to "please" then if I forget to run sudo $ rm file.png Permission denied I can type $ please !! and it works :D
- 1 more reply
New conversation -
-
-
Throw this in your .inputrc, and you can start typing a command, and arrow keys will navigate your history, only showing entries that start with what you've typed so far: "\e[A": history-search-backward "\e[B": history-search-forward "\e[C": forward-char "\e[D": backward-char
-
Wow. Awesome. Thanks!
- End of conversation
New conversation -
-
-
!! and its ilk are a bit dangerous since you don't get a chance to confirm what's about to happen. My fave new bashism is Ctrl-x Ctrl-e which opens an editor and then runs when you save and quit.
-
I appreciate zsh's behavior where it just creates the correct command from !!, And doesn't execute immediately. Is there a way to make bash do that?
-
shopt -s histverify
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.