- cross-posted to:
- [email protected]
- cross-posted to:
- [email protected]
i renamed my home folders to
dl
,docs
,pics
, etc. and use auto-cd (whatever its called) to just typedl
instead ofcd dl
You could just use aliases in your bashrc
alias dl=cd ~/Downloads
Might need quotes around the command.
sure, but what if need a subfolder of
dl
, likedl/source
or whatever. same with documents and picturesYou have to try it but I think it still works. Aliases just replaced the text you typed with text in the alias, so if you append a subfolder to the alias it should also be appended to the command.
It’s like using !! when navigating folders. You can do
cd ~/Downloads
and then!!/source
and it resolves tocd ~/Downloads/source
I’m sure that still works with aliases. Then you’ll have dl/source and Doenloads/source that are the same location. Using aliases will mean any script or program you may use that might point to them won’t just create a new default folder that is then no longer the same location as the renamed one that you’ll expect everything in
ok but if i open a gui file explorer, i can type
dl
to go to focus downloads, anddo
can match downloads or documents (or dotfiles)Oh, yeah i think i also confused them with symlinks, you could use them?
true, but then i would have duplicates of those folders in home directory
That’s fair
Reasonable and sane behavior of
cd
. Just get into the habit of always using lower case names for files and directories, that’s how our forefathers did it.Lower case directories?
Eww
ILikeMineInAWayICanReadThemProperly, instead of ilikemineinawayicanreadthemproperly
If a directory has multiple words in it I usually do kebab case: i-like-mine-in-a-way-i-can-read-them-properly. Both easier to read and type than pascal case.
For more complex filenames I use a combination of kebab-case and snake_case, where the underscore separates portions of the file name and kebab-case the parts of those portions. E.g.
movie-title_release-date-or-year_technical-specifications.mp4
CamelCase directories and snake_case files.
Do. none of you use case insensitive autocomplete? “do ” “Downloads”
Yes, but this is the default on many distros, so for once the end user is not to blame
Even worse, many components will ignore the
XDG_DOWNLOAD_DIR
var so even if you manually change it to$HOME/downloads
(lower-case) it will often break things.Why not just
cd $XDG_DOWNLOAD_DIR
in the first place?That’s not an environment variable. It’s defined in
${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs
.Though you can use the
xdg-user-dir DOWNLOAD
command to get it automatically.
Keep filling those bugs and stop complaining on random forums, kids
Porque no los dos?
ln -s ~/Downloads ~/downloads
This is all fun and games until you try moving a backup to a file system that’s case-insensitive
Something something symlink Downloads to downloads
Yeah but the main issue is that I don’t want there to be a
Downloads
directory in my home.
Or use a nicer alternative like zoxide! :)
Or Windows ;)
Don’t even have to cd when using completion with fish/zsh. Just type
down[tab]
echo ‘set completion-ignore-case On’ >> ~/.inputrc
also idk does zsh do this automatically? don’t think i’ve ever had this problem except on legacy AF servers
i mean… unless you don’t tab complete, but then who doesn’t spam tab 30 times every keystroke?
Or up-arrow a bazillion time because you probably have it SOMEWHERE in the buffer, surely.
Shit yo. How come I only learn this now? Thanks!
Awesome, thanks
How does that handle languages that have different rules for capitalization? For example I and i are not the same letter in Turkish.
I believe that type of stuff is specified in your locale, so it’s possible that it would do the right thing if you’ve set your language to Turkish. Please try it and let us know though :)
Don’t know actually, never used a language like that. But should be easy enough to undo should one test it and end up not liking how it handles it.
Use Zsh or Fish and tab completion.
Or better yet, use z or zoxide:
“z down” will fuzzy match the “~/Download” folder.Never used or heard of it before but apparently zoxide is only for
cd
command, do you happen to know if there’s some fuzzy match for in general?At the moment what I do is
history foo | grep -i "bar"
Yeah, if that’s the only reason, changing your shell is overkill.
This is the way!
cd snuts
did you mean smuts?
Fish baby. Fish.
Here’s how to fix this[+]
Create
$HOME/.config/user-dirs.dirs
withXDG_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.
XDG User dirs are cool, i agree. But that’s not really the problem here
You’ve come from Windows and have brought dangerous expectations.
MacOS has a case insensitive file system. It causes me untold grief
Is a 40 year old it guy who love linux, wat
Macos is case insensitive?!
OSX offers both case sensitive and case insensitive filesystems
Defaults to insensitive and if you want to change it you have to reformat 🥲
I’ve been using case insensitive fs on macOS for years and the only software having issues with this is onedrive.
can’t say i’m surprised.
I have issues with Docker a lot. Example: Rename a file from “File.js” to “file.js” in a dependency and it’s like something caches the old name so even when I redownload or install that dep it tries the old name and fails to find the file. Might just be me and my tomfoolery
if you’re renaming from
File.js
tofile.ts
, which is also changing suffixes instead of just capitalization, then that couldn’t be explained by case sensitivity, unless it was a typo and you meantFile.js
tofile.js
This is likely because docker runs Linux in a VM on MacOS right?
We’ve had similar problems with stuff that works on the developers Mac but not the server which is case sensitive. It can be quite insidious if it does not cause an immediate “file not found”-error but say falls back to a default config because the provided one has the wrong casing.
That isn’t true.
Which part? I’d love to switch if there’s no reformatting, and if your exception is with the first part, I’d ask for some evidence. All of my mac machines arrived brand new, case insensitive. Granted that’s only 3 so far, but it’s a smattering from 2019 onward. All the literature online points to this being the default too
Wow, I figured it’d be case sensitive, crazy, gotta make it more windows like I guess.
Why would case sensitive path names be considered dangerous?
I don’t know about dangerous, but case-insensitive Unicode comparison is annoying, expensive and probably prone to footguns compared to a simple byte-for-byte equality check.
Obviously, it can be done, but I guess Linux devs don’t consider it worthwhile.
(And yes, all modern filesystems support Unicode. Linux stores them as arbitrary bytes, Apple’s HFS uses… some special bullshit, and Windows uses UTF-16.)
so if linux stores file names as arbitrary bytes them could I modify a ext4 fs to include a / in a file name
If you did it would likely break something as it’s one of only two characters not allowed in a file name (the other being null).
You can do a lot of funky stuff within the rules though, think about control characters, non-printing characters, newlines, homographs, emojis etc. and go forth and make your file system chaos!
Meanwhile fishshell:
deleted by creator
You can also disable case sensivity in bash
this seems like a recipe for disaster
Honest question: is case sensitivity that important? Are there files named settings.ini and Settings.ini, for example, in the same folder that do different things?
Since Linux 5.2, you can disable case sensitivity on the filesystem level on ext4 (called case folding).
Is there also an option to only have 8.3 filenames? Those long names are so tiresome.
How to shoot yourself in the foot in one simple step
Is this a competition for worst idea to solve the problem? :)
This is default in SteamOS.
I wonder how many things subtly break when you enable that option.
Zoxide and
cd down
. ;)You know you prefer the D
OP can definitely handle a bigger D
OMZ and TAB gang raise up!