this post was submitted on 24 Sep 2025
1272 points (98.2% liked)
Programmer Humor
26570 readers
1975 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
With ZSH there's something called "path-completion" that makes that even easier.
Say you want to go to "/usr/local/share/fonts" but that's too much to type out, you can instead type "cd /u/l/s/f" and hit tab. If every path element is unambiguous it will just expand it to "/usr/local/share/fonts". In this case though, "/u/l/" can expand to "/usr/local" or "/usr/lib" so when you hit tab it moves the cursor to just after the "l" to indicate it needs you to distinguish between "/usr/local/" and "/usr/lib". If you just type "o" and hit tab again, it will know that there's only one match for "/usr/lo" and expand that to "/usr/local/" Then there's only one match for "s" which is "share", and only one match for "f" which is "fonts".
That avoids the danger of executing a command with an asterisk wildcard.
works in fish shell as well.