Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If we were starting from scratch, we could require some marker on flags which take values. Perhaps it would have to be `--long: x`. `--verbose x` would be read as a flag with no argument, followed by a positional argument.


Isn’t that just replacing “=“ with “:”?


No, there's a space in there too!


This works to allow values to be optional while not requiring concatenation of strings in languages where that's troublesome like C.

It only lacks in being able to work with brace expansion to facilitate specifying multiple values.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: