this post was submitted on 02 Oct 2023
1350 points (96.6% liked)

Programmer Humor

19821 readers
2 users here now

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

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Feyter@programming.dev 25 points 1 year ago (4 children)

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

[–] Swedneck@discuss.tchncs.de 22 points 1 year ago (1 children)

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.

[–] 4am@lemm.ee 1 points 1 year ago

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

[–] schnurrito@discuss.tchncs.de 9 points 1 year ago (1 children)

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.

[–] user224@lemmy.sdf.org 12 points 1 year ago (2 children)

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

[–] oleorun@real.lemmy.fan 1 points 1 year ago (1 children)

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

[–] AnUnusualRelic@lemmy.world 1 points 1 year ago

They cater to windows users that are used to the quirks of their broken system.

[–] Reil@beehaw.org 1 points 1 year ago

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

[–] lemmonade@lemm.ee 9 points 1 year ago (1 children)

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.

[–] Feyter@programming.dev 3 points 1 year ago (1 children)

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

[–] Honytawk@lemmy.zip 4 points 1 year ago (1 children)

Substring is not string.

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

[–] Feyter@programming.dev 2 points 1 year ago

down matches down* because * also includes empty string. Also download matches down*

D matches D* but d is not matching D* because D is a different character than d.

[–] 1984@lemmy.today -1 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] PupBiru@kbin.social 7 points 1 year ago

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

i prefer not fire