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

Programmer Humor

27237 readers
255 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
(page 2) 50 comments
sorted by: hot top controversial new old
[–] merc@sh.itjust.works 6 points 1 month ago (12 children)

Too many people still use Bash.

[–] humorlessrepost@lemmy.world 2 points 1 month ago

I like zsh on mac because pretty colors

load more comments (11 replies)
[–] remon@ani.social 5 points 1 month ago

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

[–] Olgratin_Magmatoe@slrpnk.net 5 points 1 month ago* (last edited 1 month ago) (4 children)

grep | history [search term]

load more comments (4 replies)
[–] iAvicenna@lemmy.world 5 points 1 month ago

history | grep then !cmd no

[–] MashedTech@lemmy.world 4 points 1 month ago (2 children)
load more comments (2 replies)
[–] nullPointer@programming.dev 4 points 1 month ago

zsh tab completion also looks through history wich is pretty nice.

[–] clashorcrashman@lemmy.zip 4 points 1 month ago

...Yeah, you got me.

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

I accidentally found out one day that I could use a wildcard operator in the terminal instead of a full file or folder name due to always doing this.

cd Pho* or cd /documents/Pho*

Will for example open my "Photo Examples" folder in the working directory or based on the path

[–] JasonDJ@lemmy.zip 4 points 1 month ago (1 children)

You can use || between two commands as well. If the first command returns exit code != 0, the second command will run.

I.e. which ansible || pip install ansible.

[–] merc@sh.itjust.works 4 points 1 month ago

Or && for if you only want the second command to run if the first command succeeded.

[–] DarkAri@lemmy.blahaj.zone 3 points 1 month ago* (last edited 1 month ago) (1 children)

cd /

sudo rm -rf *

Basically the Linux version of deleting system32 but idk I'm not a super Linux nerd yet.

[–] bandwidthcrisis@lemmy.world 5 points 1 month ago

The fun thing is that you can create a file named "-rf *" and hope an admin tried to delete it!

[–] TheOakTree@lemmy.zip 3 points 1 month ago* (last edited 1 month ago)

This only works until you grow an addiction to making pho at home and start documenting your progress.

cd "Pho Recipes and Pictures"

load more comments (3 replies)
[–] RedSnt@feddit.dk 4 points 1 month ago

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

[–] dreadbeef@lemmy.dbzer0.com 4 points 1 month 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.

[–] titanicx@lemmy.zip 4 points 1 month ago

I'm in this picture, and I didn't like it....

[–] RustyNova@lemmy.world 3 points 1 month ago

Oh come on! I at least type the beginning so that it filters the history

[–] stealth_cookies@lemmy.world 3 points 1 month ago (1 children)

This is why I like atuin, I can just press up and start typing part of the command and it will likely find it in my history.

[–] merc@sh.itjust.works 2 points 1 month ago

You could already do that with just "Ctrl-R" but without atuin redrawing your screen.

[–] wewbull@feddit.uk 3 points 1 month ago (4 children)

The one people see me doing that gets a "huh?" Is:

~$ !find
find -type f -name '*blah*' -print0 | xargs -0 gzip
~$

"Wait! What did you do?" "Oh. Do you not know about bang?"

load more comments (4 replies)
[–] T156@lemmy.world 3 points 1 month ago* (last edited 1 month ago) (2 children)

Being able to just enter a partial command, and hit [up] to jump to prior commands that started in the same way in zsh is a godsend.

load more comments (2 replies)
[–] Cevilia@lemmy.blahaj.zone 2 points 1 month ago

I feel like there should be a cursed "long way round" for this that involves needlessly copying .bash_history to a "text file", running it through an asciibetical sorter (for "efficiency"), using sed to null out any command which doesn't match the search term...

[–] Quexotic 2 points 1 month ago

Featherpad, copy, paste. Extra work, but you get a work log

I wish this wasn't so painfully true.

load more comments
view more: ‹ prev next ›