this post was submitted on 24 Sep 2025
1283 points (98.1% liked)

Programmer Humor

26640 readers
2128 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
[–] Auli@lemmy.ca 38 points 6 days ago (1 children)
load more comments (1 replies)
[–] iamdefinitelyoverthirteen@lemmy.world 44 points 6 days 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 6 days ago

Been there, done that.

load more comments (3 replies)
[–] aeharding@vger.social 34 points 6 days ago (5 children)

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

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

CTRL+R for those unitiated

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

reverse-i-search + fzf = <3

load more comments (3 replies)
[–] mvirts@lemmy.world 30 points 6 days ago (2 children)
[–] veni_vedi_veni@lemmy.world 14 points 6 days ago (1 children)

and whenever you forget to sudo: sudo !!

[–] bandwidthcrisis@lemmy.world 9 points 6 days ago (1 children)

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

[–] 2910000@lemmy.world 7 points 6 days ago (1 children)

No way! I didn't know you could cycle through the results like that... awesome!

load more comments (1 replies)
[–] 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.

[–] Edgarallenpwn@midwest.social 8 points 5 days ago

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

[–] Mad_Punda@feddit.org 17 points 6 days ago

I’ve probably done that for ls

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

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

.... taptaptaptap

... tap ...

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

Or "shit, I did in tmux last time so I could close the terminal window."

[–] salacious_coaster@infosec.pub 13 points 6 days ago (8 children)
[–] drkt@scribe.disroot.org 9 points 6 days ago (3 children)

tar -xvf

but only because I had to look it up twice so now my brain has committed it to memory
I don't even know what it does

load more comments (3 replies)
[–] Hammerheart@programming.dev 7 points 6 days ago
load more comments (6 replies)
[–] killeronthecorner@lemmy.world 13 points 6 days ago

O(n) access, very efficient.

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

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

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

[–] pcouy@lemmy.pierre-couy.fr 10 points 6 days 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)
[–] Hammerheart@programming.dev 7 points 6 days ago (1 children)

cat ~/.bash_history | grep

[–] echindod@programming.dev 16 points 6 days ago (8 children)
load more comments (8 replies)
[–] SexualPolytope@lemmy.sdf.org 9 points 6 days ago (2 children)

In fish, you can enter part of the command, and then press up to search for it. It's kinda awesome.

load more comments (2 replies)
[–] freewheel@sh.itjust.works 9 points 6 days ago (2 children)

Substring completion on ZSH. Type in a small part of the command you want to find and then press up.

load more comments (2 replies)
[–] remon@ani.social 5 points 6 days ago

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

[–] UnfortunateShort@lemmy.world 8 points 6 days ago* (last edited 6 days ago)

fish has "directory-aware" autocomplete with inlay hints and a fantastic history command. I do not suffer from such weakness

[–] baltakatei@sopuli.xyz 7 points 6 days ago (4 children)

$ history | grep 'gre[p]' | less -S

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

load more comments (3 replies)
[–] flyingSock@feddit.org 8 points 6 days ago

also when they see this post

[–] merc@sh.itjust.works 6 points 6 days ago (12 children)

Too many people still use Bash.

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