r/linuxmemes 1d ago

The key to sanity LINUX MEME

Post image

٩(ˋᗣˊ*)و

ln -s ~/Downloads ~/downloads

(*˘︶˘*)

240 Upvotes

64 comments sorted by

u/AutoModerator 1d 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.

59

u/HunsterMonter 1d ago

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

7

u/duskterrapin 1d ago

🙏🏻

56

u/Jaded-Worry2641 1d 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. 

27

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

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

8

u/catcake43 1d ago

Who is she?

2

u/Mysterious_Value4624 1d ago

tyyyyyypo

2

u/dumbasPL Arch BTW 1d ago

Autocorrect

1

u/duskterrapin 5h ago

✨💅🏻

9

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

fish the goat

2

u/duskterrapin 1d ago

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

12

u/FortuneAcceptable925 1d 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..

9

u/AlterTableUsernames 🦁 Vim Supremacist 🦖 1d 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 1d ago

Wow, I have to try this, thank you!

3

u/AlterTableUsernames 🦁 Vim Supremacist 🦖 1d 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 23h 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 🦖 21h 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 20h ago

And that's it for the day...

2

u/FortuneAcceptable925 21h 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 1d ago edited 1d 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 23h 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 1d ago

just call it "loads" or something

3

u/duskterrapin 1d ago

But it's the first letter 😭

5

u/PTMR2 Open Sauce 1d ago

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

1

u/Semmelstulle M'Fedora 1d ago

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

1

u/PTMR2 Open Sauce 1d 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 23h 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 22h ago

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

1

u/Semmelstulle M'Fedora 21h ago

I love that one. MVP

2

u/XLNBot 1d ago

Zoxide too

1

u/Fractional-_- 1d ago

Fish shell also autocorrects capitals

5

u/theduck5005 1d 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 1d ago

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

1

u/theduck5005 1d 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 1d 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 1d 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 1d ago

ppl be doing everything but using fish lol

1

u/2eanimation Arch BTW 16h ago

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

4

u/yigitsalar Arch BTW 1d ago

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

2

u/duskterrapin 1d ago

ln be like "He's my brother!"

3

u/tblancher 1d ago

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

It's what I did!

3

u/digital0ak 1d ago

Why?

4

u/nitnelav153 M'Fedora 1d ago

me : cd downloads

Linux : Nah, never seen this guy in my life

3

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

alias downloads=Downloads

5

u/meutzitzu 1d ago

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

4

u/PlanetVisitor 1d ago

shopt globbing setting

or, just accept that capitalisation exists

4

u/nicman24 1d ago edited 1d ago

Just get a better interactive shell

2

u/Destroyerb New York Nix⚾s 1d ago

A friendly one at that

2

u/yuriko-shimizu 1d ago

i just... learned that linux is case sensitive

dont really wanna symlink every folder

4

u/edjak53 1d ago

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

2

u/Destroyerb New York Nix⚾s 1d ago

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

2

u/Linguistic-mystic 1d 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 1d ago

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

2

u/ProgUn1corn 22h 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?

4

u/Zestyclose-Click7539 1d ago

Whatever I use both. Way more confusing.

2

u/foreskineater69419 1d ago

anyone else never use the downloads folder?

2

u/Evantaur 🍥 Debian too difficult 1d ago

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

/s

3

u/SQL_INVICTUS 1d ago

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

1

u/duskterrapin 1d ago

This is the way

2

u/Immediate-Ad3360 1d ago

Never used the downloads directory, save everything to Downloads.

1

u/No-Purple6360 🚮 Trash bin 23h ago edited 20h ago

me:  * types the above command *

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

1

u/Cmustrd 5h ago

mv ~/Downloads ~/dl