26 points

I don’t get it… “D” is a complete different character than “d” is.

It’s like wondering why “file1” is not opened when I typed in “file2”.

permalink
report
reply
-1 points
*

People want their computers to magically know what they want these days. :)

This specific problem doesn’t exist in oh-my-zsh config though. It will find the directory even if spelling it like this.

permalink
report
parent
reply
7 points

“magically know what they want” aka occasionally set you and your files on fire

i prefer not fire

permalink
report
parent
reply
22 points

that’s not how language works though, in human language (i know this can be confusing) d and D are the same letter just in different forms.

It’s one thing to have case sensitivity in programs doing data manipulation, that makes sense because you don’t want the program to accidentally use the wrong files without supervision.

But when you have an interactive prompt you know what you’re doing, you can see if you entered the wrong directory, and you’re generally going to be working in directories that you have yourself organized.

permalink
report
parent
reply
1 point

Doesn’t tab completion solve this if there are no alternatives with matching case? sounds like a PBKAC

permalink
report
parent
reply
9 points

You could also say that down should not complete to download since those are completely different strings and you shouldn’t expect one to get you the other.

permalink
report
parent
reply
3 points

Sorry, down is a substring of download I don’t get your point either?

permalink
report
parent
reply
4 points

Substring is not string.

If they were interchangeable, then “D” & “d” should be too.

permalink
report
parent
reply
9 points

On Windows filenames are case insensitive at least usually, some people are used to that. But that is poor design for so many reasons, Turkish I being one of them.

permalink
report
parent
reply

Now take Android. Files are case-sensitive yet you can’t create 2 files with same name if they only vary in case.

permalink
report
parent
reply
1 point

TIL, thanks. I wonder why they chose to do it this way.

permalink
report
parent
reply
1 point

One of the most pointlessly annoying things I’ve had to deal with was trying to move a process made for Linux onto a Windows MINGW/cygwin-type environment where one of the scripts would generate “.filename” AND “.FileName” files. :|

permalink
report
parent
reply
8 points

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.

permalink
report
reply
4 points
*
Deleted by creator
permalink
report
parent
reply
28 points
*

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.

permalink
report
parent
reply
4 points

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

permalink
report
parent
reply
5 points

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.

permalink
report
parent
reply
4 points

Pretty hilarious for mac users, of all people, to complain about centralisation. Like, don’t you live in a walled garden?

permalink
report
parent
reply
123 points

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.

permalink
report
reply
6 points

Lower case directories?

Eww

ILikeMineInAWayICanReadThemProperly, instead of ilikemineinawayicanreadthemproperly

permalink
report
parent
reply
14 points

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

permalink
report
parent
reply
2 points

CamelCase directories and snake_case files.

permalink
report
parent
reply
91 points

Yes, but this is the default on many distros, so for once the end user is not to blame

permalink
report
parent
reply
45 points

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.

permalink
report
parent
reply
35 points

Keep filling those bugs and stop complaining on random forums, kids

permalink
report
parent
reply
11 points
*
Removed by mod
permalink
report
parent
reply
3 points

Why not just cd $XDG_DOWNLOAD_DIR in the first place?

permalink
report
parent
reply
28 points

Something something symlink Downloads to downloads

permalink
report
parent
reply
3 points

Do. none of you use case insensitive autocomplete? “do ” “Downloads”

permalink
report
parent
reply
86 points

You’ve come from Windows and have brought dangerous expectations.

permalink
report
reply
20 points

MacOS has a case insensitive file system. It causes me untold grief

permalink
report
parent
reply
28 points
*

Is a 40 year old it guy who love linux, wat

Macos is case insensitive?!

permalink
report
parent
reply
15 points

OSX offers both case sensitive and case insensitive filesystems

permalink
report
parent
reply
11 points

Why would case sensitive path names be considered dangerous?

permalink
report
parent
reply
1 point
Deleted by creator
permalink
report
parent
reply
12 points
*

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.)

permalink
report
parent
reply
1 point

Meanwhile fishshell:

permalink
report
parent
reply
1 point

so if linux stores file names as arbitrary bytes them could I modify a ext4 fs to include a / in a file name

permalink
report
parent
reply
89 points

Use a shell with decent auto-completion. I have not been irritated by this in years.

permalink
report
reply
11 points

Oh my zsh?

permalink
report
parent
reply
3 points

No. Zsh. It’s pretty easy to have a nice auto compl. No need for omz. After knowing poweline10k I just use it and syntax highlight plugin, manually installed. There is no need to add entire omz.

permalink
report
parent
reply
26 points

Won’t autocomplete fail if you do “cd d” and then try the autocomplete?

Or is that what you mean by “decent” auto-completion?

permalink
report
parent
reply
28 points

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)

permalink
report
parent
reply
25 points

bash’s autocomplete fails (at least with default settings), but e.g. zsh can figure out what you mean

permalink
report
parent
reply
9 points

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.

permalink
report
parent
reply
5 points

The choice of the letter d was brilliant, that’s for sure. Now I’m imagining a folder with a large D.

permalink
report
parent
reply
6 points

I just don’t use caps when naming directories

permalink
report
parent
reply
2 points

What shell would you recommend? 🤔

permalink
report
parent
reply
7 points
-9 points

Is fucking irrelevant. Just use your package manager.

permalink
report
parent
reply
4 points

Zsh.

Omg looks like people think omz is a shell.

permalink
report
parent
reply
3 points

I personally like xonsh despite the minor amount of wonkiness it has, it’s so nice to have python available directly in your shell, it takes the “i don’t care about the quality of my code i just want this shit to work with minimal effort”-ness of bash and turns it up to 13.

permalink
report
parent
reply
16 points

I use fish which is quite nice OOTB, although if you want a posix compliant shell, zsh with some plugins is also great.

permalink
report
parent
reply
4 points

If you need to run a set of commands or a script with fish you can just toss them in a file and run bash file.sh. I have been daily driving fish for years and I don’t even have think about it.

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

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

Community stats

  • 3.8K

    Monthly active users

  • 1.1K

    Posts

  • 39K

    Comments