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

giving a description for arguments #332

Open
noraj opened this issue Jul 30, 2024 · 1 comment
Open

giving a description for arguments #332

noraj opened this issue Jul 30, 2024 · 1 comment

Comments

@noraj
Copy link
Contributor

noraj commented Jul 30, 2024

[DSL#arg] lacks a :desc option to describe the argument in order to specify what is expected.

For example, in other tools you often see description for arguments:

haiti help message
git add help message

The temporary workaround I found was to describe them in the long_desc:

        duzdu.desc 'TODO'
        duzdu.long_desc "<name>: DNS name, A record. The domain is automatically appended, e.g. test ➡️ test.example.org\n\n<ip>: IP address."
        duzdu.arg :'<name>'
        duzdu.arg :'<ip>'
        duzdu.command :add do |add|
          add.action do |_global_options, options, _args|
            duz = duzdu_init(options)
            duz.display('addv4')
          end
        end

hacking the arguments' description into the command long description:

hacking the arguments' description into the command long description

@davetron5000
Copy link
Owner

Yeah, this seems useful. Could be complicated to document and format but there's no philosophical reason why this isn't there.

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

No branches or pull requests

2 participants