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
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
28 points

Something something symlink Downloads to downloads

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
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
3 points

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

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

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
1 point

Meanwhile fishshell:

permalink
report
parent
reply
1 point
Deleted by creator
permalink
report
parent
reply
76 points

cd snuts

permalink
report
reply
2 points

did you mean smuts?

permalink
report
parent
reply
63 points

This is a feature, not a bug

permalink
report
reply
31 points

Right? I rather not have a computer automatically autocorrect.

permalink
report
parent
reply
6 points

Yeah, and I think most shells will correct this case by pressing tab

permalink
report
parent
reply
3 points

Also, I constantly name files in the same directory the same thing except for case. In my ~/tmp directory I have unrelated foo.c (C source) and foo.C (C++ source).

permalink
report
parent
reply
4 points

Chaotic evil

permalink
report
parent
reply
2 points

Why not .cpp for C++? I don’t use C++, but I thought that was the standard.

permalink
report
parent
reply
13 points
*
Deleted by creator
permalink
report
parent
reply
6 points

Why did Linux systems go for capitals in the home folder? It’s actually kind of annoying and takes extra key presses.

…A while later “XDG Base Directory Specification”

permalink
report
parent
reply
8 points
*
Deleted by creator
permalink
report
parent
reply
2 points

XDG specifies the capital names, but to be nitpickingly technically precise, linux systems don’t do this. It mostly is done by the distribution maintainers, and the XDG specs. A base system does not usually have a notion of anything beyond your $HOME.

Try adding a user: sudo adduser basicuser. If you ls -al ~basicuser you will see it’s almost empty, just the .bashrc (or in my fedora, there’s some .mozilla crap in /etc/skel that also gets bootstrapped).

permalink
report
parent
reply
1 point
*

I like you style

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