this post was submitted on 02 Oct 2023
1403 points (96.7% liked)

Programmer Humor

24912 readers
1312 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
 
you are viewing a single comment's thread
view the rest of the comments
[–] xnasero@programming.dev 11 points 2 years ago* (last edited 2 years ago) (10 children)

Op does not know about $CDPATH and tab completion keke

[–] PennyJim@lemmy.world 5 points 2 years ago (9 children)

I've seen a number of comments imply the possibility of case insensitive tab completion. Is this real and how do I do it?

I have multiple times fumbled with forgetting to capitalize something, only for the terminal to 'dunk' at me

[–] zlatko@programming.dev 8 points 2 years ago (4 children)

For bash, this is enough:

# Bash TAB-completition enhancements
# Case-insensitive
bind "set completion-ignore-case on"
# Treat - and _ as equivalent in tab-compl
bind "set completion-map-case on"
# Expand options on the _first_ TAB press.
bind "set show-all-if-ambiguous on"

If you also add e.g.CDPATH=~/Documents, it will also always autocomplete from your Documents no matter which directory you're on.

[–] PennyJim@lemmy.world 3 points 2 years ago

Setting CDPATH=:~/Documents/Dev makes navigating to any of my projects so much easier.

Thanks for bringing it to my attention

load more comments (3 replies)
load more comments (7 replies)
load more comments (7 replies)