Hacker News new | past | comments | ask | show | jobs | submit login

> Seems like a weird regression 16 years after Windows XP shipped with "My Documents".

Interesting though, that 6 years ago they reverted back to simply "Documents".

In modern windows, essential user paths no longer need have spaces in them. The persistence of "Program Files" and the hilariously tricky "Program Files (x86)" are notable however.




What is wrong with spaces in file names? When my wife was doing research for her thesis she had all the papers she was citing named with the full title of the paper. Linux handled it fine, and it seemed utterly modern and natural to me.


It is very easy to write a bash script that completely mishandles variables containing filenames with spaces, for example:

cp ${FILENAME} /tmp

Here you should have done:

cp "${FILENAME}" /tmp

Also, GNU make, still one of the cornerstones of building C and C++ libraries (since CMake and Autotools most commonly use that backend) cannot handle spaces in paths at all well.


That’s a problem with those tools that, frankly, should have been addressed long ago. There are ways for script creators to deal with spacing in names, but spaces have been supported for decades now, on every OS, so it’s silly that the tools we use every day act like they don’t exist.


While I agree with what you have said, as creators of a software distribution bundling software and a build system to build more software it would be remiss of us not to warn people when they try to install said software into a path containing spaces.

Though as @kalefranz said already, we do allow it on Windows, we just warn loudly.


Also as far as I remember Windows doesn't distinguish between capital and lower case letter in file paths


Yes it does. By default it is case-preserving, case-insensitive but there is a registry key to enable case-sensitivity.

https://superuser.com/q/266110


Thanks.


That's a problem with the shell, not the tools.

The shell is deciding whether something is one arg or more, and passing the arg list to the tools.


I'd include the shell as one of the tools we use on a regular basis. If I use a command like scp with wildcards in the input path, and the files that are returned contain colons, for example[0], the fact that the shell doesn't quote every file with a space or colon in its name before passing it off to scp is a deficiency in the shell, which gets reflected when scp refuses to copy it.

[0] https://stackoverflow.com/questions/14718720/how-can-i-scp-a...


It is also an unavoidable problem with GNU make and an easy to make mistake when writing CMake files. These tools should have required quoting up-front so filenames are never seen without them but it's a bit late in the day now to suggest fixing this.


"if ifs and buts were candy and nuts, we'd all have a merry Christmas"


For something like a programming language interpreter, it's just annoying.

C:\Program Files\Python 3.0\ vs C:\bin\python3

(when I was using windows, I installed python in c:\bin because I knew I would be typing it quite a bit)


I don't know much about windows but does it not have a $PATH like in POSIX systems? I seem to remember that typing "run cmd.exe" worked without having to give the full path of "cmd.exe".


Yes it's very similar. `;` separated rather than `:` (Because of the drive specifier e.g. `C:\`) and classically embedded variables surrounded with % e.g. `%JAVA_HOME%`, although these days powershell just uses $ variables just like everybody else.


Sure, and you just run "python" often enough, but you type the path otherwise enough too.


Escaping spaces in every command is not super fun/user friendly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: