16 ms·
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 p
by timthelion 9y ago
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.
- maxerickson 9y agoFor 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)
- timthelion 9y agoI 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".
- rusk 9y agoYes 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.
- maxerickson 9y agoSure, and you just run "python" often enough, but you type the path otherwise enough too.
- RayDonnelly 9y agoIt 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.
- JoBrad 9y agoThat’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.
- RayDonnelly 9y agoWhile 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.
- type0 9y agoAlso as far as I remember Windows doesn't distinguish between capital and lower case letter in file paths
- RayDonnelly 9y agoYes 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 https://superuser.com/q/266110
- type0 9y agoThanks.
- tyingq 9y agoThat'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.
- 9y ago
- jpambrun 9y agoEscaping spaces in every command is not super fun/user friendly.