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

Support named positional arguments #19

Open
nacl opened this issue Nov 24, 2023 · 1 comment
Open

Support named positional arguments #19

nacl opened this issue Nov 24, 2023 · 1 comment

Comments

@nacl
Copy link

nacl commented Nov 24, 2023

Hello!

Clingon looks rather nice. Looking through it, I wonder if there's support for what python's argparse calls "positional arguments". That is, arguments on the command line that are not associated with options, but are still accessible by a given name after arguments are processed.

For example, say I wanted to be able to access the first two named arguments as "foo" and "bar". If the user passes in:

$ cmd first second

A function like:

(getopt cmd 'bar)

should return "second".

Does clingon support this? I didn't see anything when I browsed the documentation and examples.

While it is possible to process the free arguments list to extract these arguments, it would be much simpler for the user if clingon could deal with it implicitly and provide all the nice machinery it provides for free.

@dnaeon
Copy link
Owner

dnaeon commented Nov 24, 2023

Hey @nacl ,

Currently this behaviour is not supported in clingon. If I find some spare time I might be able to look into implementing it, but I'd also be happy to review any PRs!

Thanks!

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