Skip to content
This repository has been archived by the owner on Jul 2, 2022. It is now read-only.

Show help for :default option #5

Open
crocket opened this issue Jan 15, 2020 · 3 comments
Open

Show help for :default option #5

crocket opened this issue Jan 15, 2020 · 3 comments

Comments

@crocket
Copy link
Contributor

crocket commented Jan 15, 2020

I want to explain how unnamed arguments are handled in help.

@rduplain
Copy link
Contributor

Hello! If you run the example code in the README:

   # ...
   "thing" {:kind :option
            :help "Some option?"
            :default "123"}]

... the usage includes:

     --thing VALUE=123                       Some option?

Note that the --thing VALUE=123 matches the :default "123". Does this behavior provide what you need, or are you looking for something else?

@crocket
Copy link
Contributor Author

crocket commented Feb 11, 2020

There is also a special option :default that will be invoked on arguments that do not start with a -- or -. Use this option to collect unnamed arguments to your script.

I want some help text for unnamed positional arguments. For example,

Usage: Program [options] ZIP-FILE FILES...

@rduplain
Copy link
Contributor

@bakpakin How do you intend the special option :default to work? ☝️

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

No branches or pull requests

2 participants