Live data from Hacker News

I'm “still afraid to use spaces in file names” years old

twitter.com

51–60 of 817 posts

Re: I'm “still afraid to use spaces in file names” years old

#52
post #22

This is a UI/UX problem that I only face when dealing with shells and shell scripts. Never had any issues when spawning processes from within languages/runtimes that support sane argument arrays. sh , bash and cmd.exe are shit. The shell needs serious rethinking.

I see that there are lots of comments about problems of TAB-completions with filenames with spaces in this comment section and I am frankly puzzled: both Bash and cmd.exe actually TAB-complete those perfectly fine, inserting quoting where it's needed.

> inserting quoting where it's needed

You have to remind yourself to do this manually in scripts if you don't want to see lines full of "No such file or directory."

One of the reasons the shell is broken is because the character they use as an argument array member separator is something that regular people use to distinguish between two words, such as in a file name.

Re: I'm “still afraid to use spaces in file names” years old

#54
Remember when we put + instead of %20? Spaces in URL's are still a nightmare IMO. I still get strange access log entries where some encoding went lose, especially in heavy Javascript enviroments.

Same goes for capitalisation. All filenames should be lowercase.

Maybe it's not strictly necessary, it can avoid headaches.

Re: I'm “still afraid to use spaces in file names” years old

#55

Spaces breaking tab completion is still an issue, so, yeah. ETA: not broken in a technical sense, but having to escape them isn't the best experience. So it's just easier for me to avoid spaces.

Where? It works fine in bash and I think most shells ….

Re: I'm “still afraid to use spaces in file names” years old

#56
post #25

Looks like I'm in the minority. I always use spaces and non-ASCII characters in filenames. In many languages it's a requirement. For example, in Romanian, there are 8 words that collide with „fata“ if you remove the diacritics (fata, fată, fața, față, făta, făță, fâța, fâță). Given that we have to use diacritics, spaces don't seem like a big deal.

So how did you deal with it in the 80s/90s?

As you would assume: use ASCII and deduce from context. Many people still do that.

That has lead to phantom diacritics: reading letters in unfamiliar words/names based on what you assume they are. For example some pronounce Chirica as Chirică because they assume someone forgot to type the breve in ă.

Re: I'm “still afraid to use spaces in file names” years old

#57
post #55

Spaces breaking tab completion is still an issue, so, yeah. ETA: not broken in a technical sense, but having to escape them isn't the best experience. So it's just easier for me to avoid spaces.

Where? It works fine in bash and I think most shells ….

That was a bit of hyperbole on my end, my bad. But you do have to escape the space, which I'm counting as a minor break.

Re: I'm “still afraid to use spaces in file names” years old

#58

Earlier quoted context omitted.

I find this attitude misguided. More descriptive names are more ergonomic for things you only use rarely but they need to be combined with much better autocompletion than most shells provide by default.

You state that as if that were objective.. but that's not my subjective experience at all. Somehow I have a hard time remembering these long names, (is it --conf or --config or --config-file or --config-path? -c would've done it for me. --set or --set-prop or --set-property or --prop or --property?), and I need to look them up in a man page anyway, and I make more typos typing them, and shell completion rarely works…

the most used options for properly written tools have both short single char option like -c and long-form version --config if you need verbose self-describing option.

If you are using cli tools of github written by a random person, then no wonder you will see non-standard approaches to UX.

Re: I'm “still afraid to use spaces in file names” years old

#59
post #33

Earlier quoted context omitted.

Hmmm, I thought I was fluent in Romanian (born there and lived there for 26 years), but I only know 5 of those 8 words...

According to Google Translate the first two are "girl" and the rest are "face". =)

* fata - the girl

* fată - girl

* fața - the face

* față - face

* făta - was giving birth

* făță - a small fish, or a child who won't sit still

* fâța - was fussing

* fâță - variant of făță

As you might infer from the first 4, Romanian uses postfix "the" and for singular feminine words you can't tell the difference if you use only ASCII.

Re: I'm “still afraid to use spaces in file names” years old

#60
post #52

Earlier quoted context omitted.

I see that there are lots of comments about problems of TAB-completions with filenames with spaces in this comment section and I am frankly puzzled: both Bash and cmd.exe actually TAB-complete those perfectly fine, inserting quoting where it's needed.

> inserting quoting where it's needed You have to remind yourself to do this manually in scripts if you don't want to see lines full of "No such file or directory." One of the reasons the shell is broken is because the character they use as an argument array member separator is something that regular people use to distinguish between two words, such as in a file name.

Well, writing scripts would be much less painful if $VARNAME did not explode into pieces by default. Alas, this ship has sailed long ago.
Post reply on HN