2 ms·
Or, put another way: Getting the 10% of the cases that have whitespace or metacharacters in variable values and filenames to work ... takes the other 90% of th
by JdeBP 3y ago
Or, put another way:
Getting the 10% of the cases that have whitespace or metacharacters in variable values and filenames to work ... takes the other 90% of the time. (-:
I habitually quote variable expansions, even when I know that the variables are never going to contain whitespace. Because long experience has taught me that one day they will.
Just like I've learned never to assume that ${PATH} is always non-blank and so assume that PATH="${PATH}:/something" won't accidentally add the current directory to my search path. (-:
- SAI_Peregrinus 3y ago/Τĥιs ñåmè įß ą váĺîδ POSIX /--file paτĥ
- rascul 3y agoIt might be nice to be more restrictive about what can be in a filename. I'm sure there would be a lot of different opinions though.
- 9dev 3y agoOr, you know, it would be nice to have a shell that didn’t assume everyone lives in North America and speaks only a single language..? Lots of things written more recently have shown that support for more, eh, inclusive, character encodings can work just fine.
- rascul 3y agoI meant things like whitespace and non printable characters though. I guess I could have been more specific.
- 9dev 3y agoAh, that’s fair. I thought you were referring to the „strange“ letters used in the parent comment.
- SAI_Peregrinus 3y agoAll the characters in my example are printable. Not all of the octets are, of course, but octets aren't characters. And spaces are extremely common in names, e.g. music track and album names contain spaces more often than not (and thus usually end up in file names). If you can't even support using the biggest key on every keyboard in file names you're doing something horribly wrong.