3 points

I do that sometimes, lazy as I can be

permalink
report
reply
1 point

That’s when I realise I need more coffee.

permalink
report
reply
7 points

Sorry, do you not keep sql scratch files around?

If deving on the cli name and save to separate files your reusable queries…

permalink
report
reply
4 points

I definitely do this with terminal commands, because I’m not hunting for whatever the specific command line to animate my gif wallpaper is.

permalink
report
reply
2 points

been there, done that.

then i heard about cli snippet manager. now i use qownnotes snippet manager qc. or you might try pet.

permalink
report
parent
reply
1 point

did you know about the ctrl+r command so you can search logged commands by keyword!

magic lobster party told me about it and it’s amazing!

I had no idea that was a function until now.

permalink
report
parent
reply
10 points

Ctrl + R is a life changer.

permalink
report
parent
reply
10 points
*

HOLY SHIT.

hahahaha, thank you. oh my gosh.

This is the most significant terminal hotkey I’ve learned in months.

♪⁠┌⁠|⁠∵⁠|⁠┘⁠♪

permalink
report
parent
reply
3 points

Upvoted for the dancing and singing emoticon. Nice art.

permalink
report
parent
reply
52 points

permalink
report
reply
36 points

I really like this comic. Just in case someone didn’t know in Linux you can:

-Ctrl + r to search previous commands

Or

-type history and precede the command number by an exclamation (!) to repeat the command (I.e. “!13”)

permalink
report
parent
reply
21 points
*

Or just !! for the last command. Particularly helpful if you forgot to prefix it with sudo you can run sudo !!

permalink
report
parent
reply
2 points

Learn something new everyday

permalink
report
parent
reply
7 points

What. Da fuck. This always existed?!

permalink
report
parent
reply
8 points

It’s probably from within the last 30 years or so

permalink
report
parent
reply
6 points

Also if you put “sensitive” information in your history by mistake you can use “history -d <line#>” to remove it.

Unfortunately I had to use this command too many times.

permalink
report
parent
reply
5 points

Fish shell does this automatically. It’s one of the reasons I love it. You can auto-complete based on your command history.

permalink
report
parent
reply
4 points

I’m personlly a zsh+oh-my-zsh person which has the same type of auto complete option.

My only regret is that something broke the thefuck plugin on my pc and now swearing at my screen doesn’t fix my mistakes.

permalink
report
parent
reply
8 points

I highly recommend installing fzf, and its shell integration. Makes your Ctrl + r magnitudes more pleasant to use!

permalink
report
parent
reply
4 points

Or control R, start typing a bit, control r again.

permalink
report
parent
reply
4 points

This works in Powershell as well, even on Windows…

permalink
report
parent
reply
1 point

Ctrl + r to search previous commands

That’s a readline thing by the way, so it doesn’t just work in bash but also works with other cli applications that are compiled with readline support, for example virsh, psql, fdisk, …

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 7.2K

    Monthly active users

  • 954

    Posts

  • 37K

    Comments