Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single dash is parsed as unrecognized argument #164

Open
alyssais opened this issue Jun 18, 2023 · 1 comment
Open

Single dash is parsed as unrecognized argument #164

alyssais opened this issue Jun 18, 2023 · 1 comment

Comments

@alyssais
Copy link

According to the Fuchsia command line rubric, and general Unix practice, a single dash is not allowed as a key or switch, but that's how argh treats it, because it doesn't have a special case for it like it does for --.

if next_arg.starts_with('-') && !options_ended {

This means that to pass a single dash as a positional argument, you have to pass -- -, which is very unintuitive.

@KateMorley
Copy link
Contributor

Fuchsia’s Command-line Tools Rubric states:

A single dash ('-') on its own is reserved for future use.

As such, it would be incorrect to treat it as a positional argument. However, a dedicated error message could improve upon the current Unrecognized argument: -.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants