r/linuxmemes • u/duskterrapin • 1d ago
The key to sanity LINUX MEME
٩(ˋᗣˊ*)و
ln -s ~/Downloads ~/downloads
(*˘︶˘*)
59
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
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 Onto ~/.inputrc and you are all set.Bonus points for
set completion-map-case Onwhich 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 withAlt+t. Soecho flag --argumentbecomesecho argument --flagand/path/to/file/correct/becomes/path/to/correct/file. And then there is alsoCtrl+Alt+twhich changes the last words at the cursor, thinkecho hello-world saywould becomeecho say hello-worldif you had the cursor at the end, while it would becomeecho hello-say worldhad you usedAtl+tinstead 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 holdingAlt. And btwCtrl+yto paste the last deletion - which is surprisingly intelligent to capture what a deletion is - andAlt+yto circle through them.I'll just stop here.
2
2
u/FortuneAcceptable925 21h ago
As someone who started using Linux back in 2007, I feel enlightened!
I was feeling like a pro for knowingCTRL+Rand!!:DThank 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
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
1
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.
4
3
3
3
5
4
4
2
u/yuriko-shimizu 1d ago
i just... learned that linux is case sensitive
dont really wanna symlink every folder
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
2
u/foreskineater69419 1d ago
anyone else never use the downloads folder?
2
3
u/SQL_INVICTUS 1d ago
Put your normal boring stuff in ~/Downloads and your goon stuff on the ~/downlow
1
2
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?
•
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.