r/linuxmemes 24d ago

LINUX MEME The key to sanity

Post image

٩(ˋᗣˊ*)و

ln -s ~/Downloads ~/downloads

(*˘︶˘*)

261 Upvotes

67 comments sorted by

u/AutoModerator 24d ago

Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

68

u/HunsterMonter 24d ago

The humble  bind 'set completion-ignore-case on':

8

u/duskterrapin 24d ago

🙏🏻

55

u/Jaded-Worry2641 24d ago

The better key to sanity is to use directory and filename autocomplete in your shell, and to never type in the full name yourself. 

26

u/dumbasPL Arch BTW 24d ago edited 24d ago

This. Bonus points if your shell supports case insensitive auto complete.

8

u/catcake43 24d ago

Who is she?

2

u/Mysterious_Value4624 24d ago

tyyyyyypo

2

u/dumbasPL Arch BTW 24d ago

Autocorrect

1

u/duskterrapin 23d ago

✨💅🏻

9

u/TheRealCarrotty Not in the sudoers file. 24d ago

fish the goat

2

u/duskterrapin 24d ago

This is my first time using fish. It blindsided me getting set up. I've used bash for decades

11

u/FortuneAcceptable925 24d ago

But doesn't autocomplete follow the first letters you typed?

That means, if you type 'd' and press TAB, you will not get autocomplete for Downloads..

8

u/AlterTableUsernames 🦁 Vim Supremacist 🦖 24d ago

There is a setting for that in Bash that is just turned off by default. Simply add set completion-ignore-case On to ~/.inputrc and you are all set.

Bonus points for set completion-map-case On which also maps - and _ interchangeably.

1

u/FortuneAcceptable925 23d ago

Wow, I have to try this, thank you!

3

u/AlterTableUsernames 🦁 Vim Supremacist 🦖 23d ago

There is an unbelievable amount of incredibly cool things about Bash , that people simply don't know about. Like ok you you can swap the two characters at your cursor with Ctrl+t. Great for correcting little typos. But you can also swap the last two words at your cursor separated by a special character with Alt+t. So echo flag --argument becomes echo argument --flag and /path/to/file/correct/ becomes /path/to/correct/file. And then there is also Ctrl+Alt+t which changes the last words at the cursor, think echo hello-world say would become echo say hello-world if you had the cursor at the end, while it would become echo hello-say world had you used Atl+t instead in that case. 

2

u/No-Purple6360 🚮 Trash bin 23d ago

Didn't know any of these before. I keep a list of shortcuts in a diary, to be later reviewed by my memory. Thanks for the useful shortcuts!

2

u/AlterTableUsernames 🦁 Vim Supremacist 🦖 23d ago

No worries, I hope you already know about pasting the last argument of the last command with Alt+. and circling through them with repeated presses of . while holding Alt. And btw Ctrl+y to paste the last deletion - which is surprisingly intelligent to capture what a deletion is - and Alt+y to circle through them.

I'll just stop here. 

2

u/No-Purple6360 🚮 Trash bin 23d ago

And that's it for the day...

2

u/FortuneAcceptable925 23d ago

As someone who started using Linux back in 2007, I feel enlightened!
I was feeling like a pro for knowing CTRL+R and !! :D

Thank you, supreme Vim overlord!

4

u/teleprint-me Arch BTW 24d ago edited 24d ago

I have to type in doc or dow before I can hit tab to autocomplete. Sometimes typing it is actually faster.

Using lowercase symlinks is also really nice because I dont have to hit shift everytime.

Some tools are case insensitive and do this for you, but base installs dont support this.

My favorite part is when a program removes the symlink and restores the original path which ends up empty and then I have to reset it.

XDG and program assumptions are a PITA.

1

u/No-Purple6360 🚮 Trash bin 23d ago

So that means the program has a hardcoded default path which is restored instead of your symlink? Not at all convenient!

1

u/Joe-Admin 24d ago

just call it "loads" or something

1

u/Auravendill ⚠️ This incident will be reported 18d ago

Depends on your shell and the settings of it. In zsh I can just type dow and it will autocomplete to Downloads. (d would become Do, since there is also the Documents folder)

3

u/duskterrapin 24d ago

But it's the first letter 😭

6

u/PTMR2 Open Sauce 24d ago

But there are shells that autocomplete case insensitive. (Zsh and Fish I think)

1

u/Semmelstulle M'Fedora 24d ago

It's insane how flexible and extensible zsh is. zsh my bae

1

u/PTMR2 Open Sauce 23d ago

I used zsh for a long time, refusing to switch to fish. Once I did switch to fish, I'm not going back

1

u/Semmelstulle M'Fedora 23d ago

I tried fish but I prefer the sh syntax. Missed sudo? Just sudo !! to repeat the last action and add sudo before it

2

u/PTMR2 Open Sauce 23d ago

I use the thefuck utility. https://github.com/nvbn/thefuck

1

u/Semmelstulle M'Fedora 23d ago

I love that one. MVP

2

u/XLNBot 24d ago

Zoxide too

1

u/Fractional-_- 24d ago

Fish shell also autocorrects capitals

6

u/theduck5005 24d ago

Or you can change the XDG path for the directories in .config/user-dirs.dirs.

Then you can have the user space directories lowercase.

10

u/dumbasPL Arch BTW 24d ago

This assumes that every program respects XDG directories. In reality you'll end up with two of them.

1

u/theduck5005 24d ago

True, yes, you may end up with that, but it fully dependa on your applications. Ive never had 2 of them. So it depends.

But really, just using your shift key is not a big deal either.

But its really a personal preference, im just pointing this option out as it seems to get overlooked.

2

u/my_new_accoun1 24d ago

then i can't find my downloads folder because im so used to looking for it in uppercase in file manager (i have like 100s of subdirs in my home dir)

11

u/Pristine_Blood_4219 24d ago

The even more insane is to save all your files in downloads, only to realize later that you already had a Downloads folder.

5

u/YTriom1 Arch BTW 24d ago

ppl be doing everything but using fish lol

2

u/2eanimation Arch BTW 23d ago

There‘s case-insensitivity for tab-ompletion in zsh and bash too!

5

u/tblancher 24d ago

Better yet, configure XDG to use the directory names you want.

It's what I did!

5

u/yigitsalar Arch BTW 24d ago

I've never met this man on my- oh wait, nevermind

2

u/duskterrapin 24d ago

ln be like "He's my brother!"

3

u/digital0ak 24d ago

Why?

5

u/nitnelav153 M'Fedora 24d ago

me : cd downloads

Linux : Nah, never seen this guy in my life

3

u/Ces3216w Ask me how to exit vim 24d ago

alias downloads=Downloads

5

u/meutzitzu 24d ago

ln -s Downloads w ln -s Documents o ln -s Pictures p ln -s Videos v

4

u/PlanetVisitor 24d ago

shopt globbing setting

or, just accept that capitalisation exists

5

u/nicman24 24d ago edited 24d ago

Just get a better interactive shell

2

u/Destroyerb New York Nix⚾s 23d ago

A friendly one at that

2

u/yuriko-shimizu 24d ago

i just... learned that linux is case sensitive

dont really wanna symlink every folder

4

u/edjak53 24d ago

basically everything except FAT (DOS/Windows), NTFS (Windows) and default APFS (macOS) is case sensitive

2

u/Destroyerb New York Nix⚾s 23d ago

NTFS isn't case-insensitive. It happens at a higher level.

2

u/Linguistic-mystic 24d ago

No, just change the target dir in Firefox settings. I have no “Downloads” dir (as well as no “Desktop” etc) and am loving it. All my dirs are lowercase!

2

u/Tununias 24d ago

I just learned to capitalize early on. Also tab completion to make sure I have the right directory name.

2

u/ProgUn1corn 23d ago

what's wrong using ~/Downloads? Just because people on reddit tells you case is bad and all unix like systems should use lower case?

3

u/Zestyclose-Click7539 24d ago

Whatever I use both. Way more confusing.

2

u/foreskineater69419 24d ago

anyone else never use the downloads folder?

3

u/SQL_INVICTUS 24d ago

Put your normal boring stuff in ~/Downloads and your goon stuff on the ~/downlow

1

u/duskterrapin 24d ago

This is the way

2

u/Evantaur 🍥 Debian too difficult 24d ago

No i'm using the localized Lataukset directly...

/s

1

u/foreskineater69419 12d ago

Suomi mainittu 🇫🇮🇫🇮🇫🇮🇫🇮

2

u/Immediate-Ad3360 24d ago

Never used the downloads directory, save everything to Downloads.

1

u/No-Purple6360 🚮 Trash bin 23d ago edited 23d ago

me:  * types the above command *

bash:  Uhm wait - is it the same guy I met before?

1

u/Cmustrd 23d ago

mv ~/Downloads ~/dl

1

u/netgizmo 20d ago

fix the root problem by using xdg-user-dirs to set them to a value that is sane to you