Hacker News new | ask | show | jobs
by eviks 9 days ago
> why does someone have a filename beginning with a dash? Maybe don't do tha

Oh, the famous "you're holding it wrong". For one, that's a ridiculous limitation to place on the user, that's a pretty basic symbol, but also imagine someone else did that and you can't change it because it's outside of your control

1 comments

It's a problem with mixing code and data, therefore needing to escape. You can solve it by adding another symbol, let's call it Options Introducer, but that doesn't actually solve it because someone can name a file starting with Options Introducer. GUIs don't have this problem because you are clearly typing in the textbox or outside of it, or even better, you can select the file you mean.
You could use an illegal file name symbol as the Options Introducer?
Then you have to have an illegal filename symbol.
Those already exist?
It's really hard to start POSIX options with a NUL byte.