Skip to content

giving a description for arguments #332

@noraj

Description

@noraj

[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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions