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.
Programmer Humor
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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
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.
Keep filling those bugs and stop complaining on random forums, kids
Porque no los dos?
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.
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.
Do. none of you use case insensitive autocomplete? “do ” “Downloads”
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.
Use a shell with decent auto-completion. I have not been irritated by this in years.
Won’t autocomplete fail if you do “cd d” and then try the autocomplete?
Or is that what you mean by “decent” auto-completion?
bash's autocomplete fails (at least with default settings), but e.g. zsh can figure out what you mean
No, it will probably go to "Documents", and if you hit tab again it should go to "Downloads". (Assuming you have the normal default folders)
Not with a decent autocomplete. It will look for a folder starting with a small d and if it doesn't exist it looks at a folder with a large D.
The choice of the letter d was brilliant, that's for sure. Now I'm imagining a folder with a large D.
I don't get what you mean. It doesn't matter if you write a uppercase or lowercase d
What shell would you recommend? 🤔
I use fish which is quite nice OOTB, although if you want a posix compliant shell, zsh with some plugins is also great.
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
I love how many people brought up the Turkish "I" as if everyone here is on the Unicode steering committee or just got jobs for Turkish facebook.
I, an English speaker, have personally solved the problem by not having a Turkish I in the name of my Downloads directory, or any other directory that I need to cd into on my computer. I'm going to imagine the Turks solve it by painstakingly typing the correct I, or limiting their use of uppercase I's in general.
In fact, researching the actual issue for more than 1 second seemingly shows that Unicode basically created this problem themselves because the two I's are just seperate letters in Turkic languages. https://en.m.wikipedia.org/wiki/Dotted_and_dotless_I_in_computing
If you nerds think this is bad try doing Powershell for any amount of time. It is entirely case-insensitive.
Why the FUCK did they make characters that look the same have different codepointers in UNICODE? They should've done what they did in CJK and make duplicates have the same codepointer.
Unicode needs a redo.
Well letters don't really have a single canonical shape. There are many acceptable ways of rendering each. While two letters might usually look the same, it is very possible that some shape could be acceptable for one but not the other. So, it makes sense to distinguish between them in binary representation. That allows the interpreting software to determine if it cares about the difference or not.
Also, the Unicode code tables do mention which characters look (nearly) identical, so it's definitely possible to make a program interpret something like a Greek question mark the same as a semicolon. I guess it's just that no one has bothered, since it's such a rare edge case.
Why are the Latin "a" and the Cryilic "a" THE FUCKING SAME?
In cases where something looks stupid but your knowledge on it is almost zero it's entirely possible that it's not.
The people that maintain Unicode have put a lot of thought and effort into this. Might be helpful to research why rather than assuming you have a better way despite little knowledge of the subject.
When it's A FUCKING SECURITY issue, I know damn well what I'm talking about.
Again you do not because the world consists of more than your interests and job description.
I know damn well what I'm talking about when someone could get scammed on "apple.com" but with a Cyrillic A.
Or use a nicer alternative like zoxide! :)
Or Windows ;)
Because you need to cd "path to directory" not cd "name" lol
lol
I seems that I have triggered something, but keep that going, it’s quality content generation. 😬
Everyone on any Linux thread ever: you are a moron, obviously and you're doing it wrong. Why don't you install another distro, or better yet: modify and recompile your distro to match your desired experience, the code is open source ffs! What do you need? 4 years of work maybe? Come on.
Anything that slightly improves UX is bloat.
True! I've got rid of my monitor a long time ago, who needs one? gshshhshshshhshbsbbs
I got rid of my whole computer a long time ago, now I just use rocks. Much less bloat.
bro that xkdc is gold
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.
Sorry, but you're plain wrong on your first issue. Getting all your packages from one source is one of the biggest upsides of Linux.
Indeed, but I'm sure we can agree that it's pretty stupid for every distro to maintain its own repo. That's a lot of duplicate work, which could be spend on more useful things. Luckily flatpak is well on its way to change that
Hm... But different distros have different philosophies (not just) about updates. That's part of why people choose a specific distro.
Theres still plenty speaking against flatpak (larger sizes, problems with GTK/qt themes, and it's only meant for GUI applications - you still need a separate system for the kernel and lower-level/cli tools. And frankly, that makes flatpak unusable to me, because the purpose of a centralized package management system is not having duplicate systems).
So in short: y'all are gonna pry pacman from my cold, dead hand.