this post was submitted on 24 Sep 2025
1291 points (98.0% liked)

Programmer Humor

26673 readers
1758 users here now

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

founded 2 years ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] Edgarallenpwn@midwest.social 8 points 6 days ago

I typed it once, I'm not typing it again

[–] dreadbeef@lemmy.dbzer0.com 4 points 5 days ago

Fish once again undefeated. If I want to find that weird image magick command I used earlier with foo.png in it I just type foo.png, hit up and its usually the first one. It doesnt matter where foo.png occurs in the command, fish will find it.

[–] RedSnt@feddit.dk 4 points 6 days ago

I write part of the command then ctrl+r. Using FZF mind you. Such a great utility.

[–] TabbsTheBat@pawb.social 91 points 1 week ago (3 children)

I've been using ctrl + R more now :3.. though I definitely used to ↑↑↑↑↑↑↑

[–] sbeak@sopuli.xyz 2 points 5 days ago

Woah Ctrl R looks super cool, never knew that I could do that before…

[–] I_Am_Jacks_____@sh.itjust.works 39 points 1 week ago (2 children)

check out fzf (install fzf and add (assuming bash) eval "$(fzf --bash)" to your .bashrc) Makes ctrl+r a superpower

load more comments (2 replies)
[–] tyler@programming.dev 22 points 1 week ago

Ctrl + r with fzf and you’ll never go back.

[–] lmmarsano@lemmynsfw.com 57 points 1 week ago (1 children)
[–] AmidFuror@fedia.io 16 points 1 week ago (2 children)

To use ctrl-r I have to remember something about the command. To use up arrow I just have to know about how many commands ago I used it.

load more comments (2 replies)
[–] B_DL@lemmynsfw.com 49 points 1 week ago (6 children)

I knew there was an

ls

In there somewhere

load more comments (6 replies)
[–] iamdefinitelyoverthirteen@lemmy.world 44 points 1 week ago (4 children)

...until you press up one too many times and enter the same command but with a typo. Again.

[–] AmidFuror@fedia.io 10 points 1 week ago

Been there, done that.

load more comments (3 replies)
[–] Auli@lemmy.ca 37 points 1 week ago (1 children)
[–] sol6_vi@lemmy.makearmy.io 0 points 6 days ago

holy fucking shit 🤌💪🤯❤️💯

[–] aeharding@vger.social 34 points 1 week ago (3 children)

The number of people who don’t reverse-I-search is too damn high

[–] ulterno@programming.dev 0 points 6 days ago (1 children)

It was quite a while before I realised that was possible.
Then not long after starting to use it, that I got fed up and just started opening up the history file and searching in it.

[–] dropcase@lemmy.world 3 points 6 days ago (1 children)

why not history | grep -i and the search term?

even if there are several, you can use ! and the command's line number to run it again

[–] ulterno@programming.dev 1 points 6 days ago

history is shell dependent.

[–] derpgon@programming.dev 26 points 1 week ago

CTRL+R for those unitiated

load more comments (1 replies)
[–] mvirts@lemmy.world 30 points 1 week ago (4 children)
[–] veni_vedi_veni@lemmy.world 14 points 1 week ago (1 children)

and whenever you forget to sudo: sudo !!

load more comments (1 replies)
load more comments (3 replies)
[–] Mad_Punda@feddit.org 17 points 1 week ago

I’ve probably done that for ls

[–] yggstyle@lemmy.world 15 points 1 week ago (1 children)

taptaptaptap.... taptaptaptap.... taptaptaptap taptaptaptap taptaptaptap

.... taptaptaptap

... tap ...

... shit I was on a different user when I typed it.

load more comments (1 replies)
[–] killeronthecorner@lemmy.world 13 points 1 week ago

O(n) access, very efficient.

No, I do not care to share the value of n

[–] salacious_coaster@infosec.pub 13 points 1 week ago (11 children)
[–] psud@aussie.zone 1 points 5 days ago* (last edited 5 days ago)

tar -jcvf archive.tbz ~/stuff/*

Of course I don't know the bomb had bzip2 on it.. I wonder if we can start with ls to see if there's anything to tar or untar

load more comments (10 replies)
[–] ezekielmudd@reddthat.com 12 points 1 week ago (7 children)

Or, just type the command “history”, find the index number of the desired command, then type “! ”, then .

[–] frezik@lemmy.blahaj.zone 12 points 1 week ago

That's way more mental effort than pressing up a bunch of times.

load more comments (6 replies)
[–] pcouy@lemmy.pierre-couy.fr 10 points 1 week ago (1 children)

https://github.com/atuinsh/atuin is a great tool to manage and search your shell history. I especially enjoy it being able to search commands based on the working directory I was in when I ran them.

It also has more features (which I don't use) to manage dotfiles and sync shell history across hosts/devices.

load more comments (1 replies)
load more comments
view more: next ›