1407
D or d come on (i.imgur.com)
(page 2) 50 comments
sorted by: hot top controversial new old
[-] xnasero@programming.dev 11 points 10 months ago* (last edited 10 months ago)

Op does not know about $CDPATH and tab completion keke

[-] PennyJim@lemmy.world 5 points 10 months ago

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 10 months ago

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.

load more comments (4 replies)
load more comments (4 replies)
[-] WindowsEnjoyer@sh.itjust.works 11 points 10 months ago

OMZ and TAB gang raise up!

[-] ram@feddit.nl 8 points 10 months ago

There are two Linux paradigms that I consider stupid. One is the use of centralized software repositories managed by the distro instead of individual developer maintained installers. The other one is file system case sensibility. They already admitted defeat on the first one with the rise of containerised applications. I wonder how much longer they'll keep the charade on the second one.

load more comments (7 replies)
[-] darcy@sh.itjust.works 8 points 10 months ago

i renamed my home folders to dl, docs, pics, etc. and use auto-cd (whatever its called) to just type dl instead of cd dl

[-] Rodeo@lemmy.ca 10 points 10 months ago

You could just use aliases in your bashrc

alias dl=cd ~/Downloads

Might need quotes around the command.

load more comments (7 replies)
[-] TetrisIQ@lemmy.world 7 points 10 months ago

You can also disable case sensivity in bash

load more comments (8 replies)
[-] Kanda@reddthat.com 7 points 10 months ago

Just make a downloads folder if you absolutely want to go there

[-] steltek@lemm.ee 7 points 10 months ago

Here's how to fix this[+]

Create $HOME/.config/user-dirs.dirs with

XDG_DOWNLOAD_DIR="$HOME/downloads"

You may need to logout/in for things to reread this file.

The full list of keys is:

  • XDG_DESKTOP_DIR
  • XDG_DOWNLOAD_DIR
  • XDG_TEMPLATES_DIR
  • XDG_PUBLICSHARE_DIR
  • XDG_DOCUMENTS_DIR
  • XDG_MUSIC_DIR
  • XDG_PICTURES_DIR
  • XDG_VIDEOS_DIR

+: Since this is Linux, this is a fix for many but not all cases.

load more comments (1 replies)
[-] Luvon@beehaw.org 6 points 10 months ago

cd dow *tab

[-] lfromanini@feddit.nl 6 points 10 months ago

Zoxide and cd down. ;)

[-] spez@sh.itjust.works 5 points 10 months ago

Fish baby. Fish.

[-] boyi 5 points 10 months ago* (last edited 10 months ago)

Don't even have to cd when using completion with fish/zsh. Just type

down[tab]
load more comments
view more: ‹ prev next ›
this post was submitted on 02 Oct 2023
1407 points (96.7% liked)

Programmer Humor

18890 readers
1138 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 1 year ago
MODERATORS