this post was submitted on 16 Jul 2024
475 points (97.2% liked)

Programmer Humor

32361 readers
832 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 9 points 3 months ago (1 children)

Spaces in file names will always be fiddly though. It'll work, but it'll still be wrong, because arguments are space separated, and having spaced file names totally messes with that.

[–] [email protected] 5 points 3 months ago* (last edited 3 months ago) (1 children)

I try to just always put files names or paths into quotes in CLI or tie it to a variable in programming. This way it also accepts spaces and knows how to separate it from arguments.

[–] [email protected] 4 points 3 months ago

Yeah. It's a good idea to guard against it, but I would still never put spaces in filesnames that I myself choose.