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

Documentation request #21

Closed
rpgoldman opened this issue Jan 21, 2024 · 1 comment
Closed

Documentation request #21

rpgoldman opened this issue Jan 21, 2024 · 1 comment

Comments

@rpgoldman
Copy link
Contributor

Could you explain how one can have positional arguments as well as option arguments? Or, if it is impossible to handle positional arguments with clingon, please let me know?

In most such frameworks one invokes a parsing procedure, and then can use the unprocessed arguments as the positional arguments, but with clingon, it's not clear when the arguments are processed and how to address the remaining ones.

It may be that this cannot be done: we might need to track the unprocessed parts of the command line and return them as additional values from parse-command-line. I was looking for some slot on the command that held remaining (positional) arguments, but I don't see anything.

I'm not sure what free-arguments are -- maybe that's what I am looking for?

@dnaeon
Copy link
Owner

dnaeon commented Jan 22, 2024

Hey @rpgoldman ,

I think you need to use CLINGON:COMMAND-ARGUMENTS.

Here's an example where it is used in clingon-demo echo foo bar baz ...

https://github.com/dnaeon/clingon/blob/master/examples/demo/echo.lisp

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