Skip to content

Default command and command alias  #484

Open
@bingis-khan

Description

@bingis-khan

Is it possible to create an alias of a command? For example in the help menu, under "Available commands", there would be something like this:

Available commands:
  search, s                         Do some searching or whatever.
  ...

Also might be related: is it possible to specify a defaut command?


Note that all of the things above are possible with a liberal use of Alternative, but these make the help menu much less appealing:

                                    \/-- looks meh
Usage: surcher [(-p|--port PORT) | COMMAND] [-d|--dir PATH]

Available options:
  -p,--port PORT           Port on which to serve the web interface.  <- this should probably be only visible in the help menu for "serve"
  -h,--help                Show this help text

Available commands:
  search                   Execute a single search with a query.
  s                        Serve a website for searching. <- """""alias"""""
  serve                    Serve a website for searching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions