logoalt Hacker News

evikstoday at 7:50 AM1 replyview on HN

> 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


Replies

inigyoutoday at 10:57 AM

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.

show 1 reply