this post was submitted on 22 Sep 2025
967 points (98.9% liked)

Programmer Humor

26551 readers
1713 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
[–] BatmanAoD@programming.dev 7 points 3 days ago (1 children)

For interactive use, tab-completion essentially makes this a non-issue, because shells add escaping in the appropriate places.

For scripting, where spaces are harder to deal with, unfortunately there's just not much you can do; your two options are basically to learn all of your particular shell's patterns for dealing with whitespace in filenames, or only write scripts in something other than a POSIX shell.

[–] lucg@lemmy.world 2 points 2 days ago (1 children)

Scripting isn't the issue, but for tab completion: the boundary is often at a space or parenthesis so that you need to type the backslash + char to continue tabbing to completion

[–] BatmanAoD@programming.dev 2 points 2 days ago

Believe me, whitespace-correct scripting is absolutely an issue.

You're right that it's annoying when filenames diverge right at a character that must be escaped.