this post was submitted on 24 Sep 2025
1269 points (98.3% liked)

Programmer Humor

26551 readers
1662 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
[–] dreadbeef@lemmy.dbzer0.com 1 points 11 hours 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 22 hours ago

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

[–] Edgarallenpwn@midwest.social 8 points 1 day ago

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

[–] Auli@lemmy.ca 37 points 1 day ago (1 children)
[–] sol6_vi@lemmy.makearmy.io 1 points 21 hours ago

holy fucking shit 🤌💪🤯❤️💯

[–] TabbsTheBat@pawb.social 89 points 2 days ago (3 children)

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

[–] sbeak@sopuli.xyz 2 points 10 hours ago

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

[–] I_Am_Jacks_____@sh.itjust.works 38 points 2 days 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 2 days ago

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

[–] aeharding@vger.social 34 points 2 days ago (5 children)

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

[–] derpgon@programming.dev 26 points 2 days ago

CTRL+R for those unitiated

[–] Everyday0764@lemmy.zip 9 points 2 days ago

reverse-i-search + fzf = <3

load more comments (3 replies)
[–] iamdefinitelyoverthirteen@lemmy.world 44 points 2 days ago (2 children)

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

[–] AmidFuror@fedia.io 10 points 2 days ago

Been there, done that.

[–] laserjet@lemmy.dbzer0.com 5 points 1 day ago (1 children)

There is an option you can set in .zshrc or .bashrc which only includes lines that exit 0 (success)

[–] antimidas@sopuli.xyz 5 points 1 day ago (1 children)

Infuriatingly that would omit things like unit test runners from the history in case they don't pass. As a developer I tend to re-run failed commands quite often, not sure how widely that applies, though.

load more comments (1 replies)
[–] janAkali@lemmy.sdf.org 4 points 1 day ago* (last edited 1 day ago) (1 children)
  • zsh-autosuggestions
  • history | fzf
  • alias cat="bat --plain --theme=gruvbox-dark"
[–] zarkanian@sh.itjust.works 6 points 1 day ago* (last edited 1 day ago) (1 children)

Aliasing cat or any other ubiquitous shell utility to a replacement is a mistake. Garuda did this, and it was driving me crazy why cat was giving me errors. Turns out that they had aliased bat to cat, and since bat is a different program, it didn't work in exactly the same way, and an update had introduced some unexpected behavior.

Drop-in replacements are dumb. Just learn to use a different command.

[–] janAkali@lemmy.sdf.org 3 points 1 day ago* (last edited 1 day ago) (2 children)

I think it's ok to add this in a personal .zshrc, not on a distro level:

If it breaks something - I'd probably know why and can easily fix it by removing alias/calling cat directly.

Also, scripts almost always use bash or sh in shebang, not zsh. So it only triggers if I type cat in terminal.

[–] psud@aussie.zone 1 points 4 hours ago

It's better to learn the new command, then it still works when you use a different machine that doesn't have your alias

[–] crater2150@feddit.org 2 points 18 hours ago

Also, even zsh scripts don't read your .zshrc by default.

[–] remon@ani.social 5 points 1 day ago

You have to be a linux user to use the console now?

[–] mvirts@lemmy.world 30 points 2 days ago (2 children)
[–] veni_vedi_veni@lemmy.world 14 points 2 days ago (1 children)

and whenever you forget to sudo: sudo !!

load more comments (1 replies)
[–] bandwidthcrisis@lemmy.world 9 points 2 days ago (2 children)

Ctrl-r, l ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r, ctrl-r. To get ls.

load more comments (2 replies)
[–] MashedTech@lemmy.world 4 points 1 day ago (2 children)
load more comments (2 replies)
[–] Mad_Punda@feddit.org 17 points 2 days ago

I’ve probably done that for ls

[–] Hammerheart@programming.dev 7 points 2 days ago (1 children)

cat ~/.bash_history | grep

[–] echindod@programming.dev 16 points 1 day ago (7 children)
[–] Hammerheart@programming.dev 2 points 19 hours ago (1 children)

Yes, it was meant to be a self deprecating admission that I have used this unnecessarily verbose command.

[–] echindod@programming.dev 2 points 11 hours ago

Ah. Well. I can not be blameless on this. I also probably use cat unnecessarily still. But less so with grep these days. I'm getting better... I swear!

load more comments (6 replies)
[–] salacious_coaster@infosec.pub 13 points 2 days ago (10 children)
[–] Hammerheart@programming.dev 7 points 2 days ago
load more comments (9 replies)
[–] yggstyle@lemmy.world 15 points 2 days 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 2 days ago

O(n) access, very efficient.

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

load more comments
view more: next ›