this post was submitted on 24 Sep 2025
185 points (98.4% liked)

Programmer Humor

38745 readers
51 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 
top 17 comments
sorted by: hot top controversial new old
[–] ramius345@sh.itjust.works 19 points 3 weeks ago (1 children)
[–] calliope@retrolemmy.com 3 points 3 weeks ago* (last edited 3 weeks ago)

Or sometimes history if I can’t remember at all.

Oh my bad, two other people said that too I was just excited

[–] PanArab@lemmy.ml 19 points 3 weeks ago
[–] foster@lemmy.hangdaan.com 11 points 3 weeks ago

It's either this or history | grep 'some-command'.

[–] nathan@piefed.alphapuggle.dev 9 points 3 weeks ago* (last edited 3 weeks ago)

history

!982

[–] HumanPerson@sh.itjust.works 9 points 3 weeks ago

You forgot a couple down arrows for when you overshoot.

[–] lugal@lemmy.dbzer0.com 6 points 3 weeks ago
[–] highduc@lemmy.ml 6 points 3 weeks ago

If you're in this picture try using fzf and backwards search, much more effective, hell even without fzf.

[–] Moonrise2473@lemmy.ml 5 points 3 weeks ago (2 children)

Introducing: fish

And then you just need to remember the first letters of the previously typed command

[–] yogthos@lemmy.ml 3 points 3 weeks ago

Yup, I started using fish a while back and autocomplete is what kept me on it. The best part is that it's contextual based on the folder you're in.

[–] barubary@infosec.exchange 3 points 3 weeks ago

Look up history-search-backward in your favorite bash/readline manual.

[–] HiddenLayer555@lemmy.ml 5 points 3 weeks ago* (last edited 3 weeks ago)

The command you want is in the buffered history of a still running terminal that's doing something you don't want to close 💀

[–] KrasMazov@lemmygrad.ml 4 points 3 weeks ago

Don't call me out like that lol. Also Atuin is pretty cool for this as you are showed a list of the commands used when you press ⬆️.

[–] scottmeme@sh.itjust.works 4 points 3 weeks ago (1 children)
[–] naevaTheRat@lemmy.dbzer0.com 4 points 3 weeks ago

Some of you haven't read the bash manual and it shows.

Blow your mind to know about bang patterns. You've used !! but do you know about !$?

[–] krash@lemmy.ml 3 points 3 weeks ago

If you haven't, try McFly - is a much better backwards / history search in the shell.