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

Hermes context specific help option #1003

Closed
5 tasks
leejw51crypto opened this issue May 27, 2021 · 6 comments · Fixed by #1012
Closed
5 tasks

Hermes context specific help option #1003

leejw51crypto opened this issue May 27, 2021 · 6 comments · Fixed by #1012
Labels
I: CLI Internal: related to the relayer's CLI O: usability Objective: cause to improve the user experience (UX) and ease using the product
Milestone

Comments

@leejw51crypto
Copy link
Contributor

Crate

Summary

add context specific help

 hermes  start --help

currently it shows

error: unrecognized option `--help`

instead , we can display help for "start" command

Problem Definition

Proposal

Acceptance Criteria


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate milestone (priority) applied
  • Appropriate contributors tagged
  • Contributor assigned/self-assigned
@adizere
Copy link
Member

adizere commented May 27, 2021

The Hermes help menu is currently implemented as a global option. This means that the help argument must come before any specific command. So to obtain the help for command start, we would write hermes help start.

$ hermes help start
hermes 0.3.2
Informal Systems <hello@informal.systems>
Hermes is an IBC Relayer written in Rust.

USAGE:
    hermes start <OPTIONS>

DESCRIPTION:
    Start the relayer in multi-chain mode. Handles packet relaying across all open channels between all chains in the config.

The same goes for any other command, including sub-commands, e.g., hermes help create or hermes help create client.
Would this solve your issue?

Related open: #134

@adizere adizere added O: usability Objective: cause to improve the user experience (UX) and ease using the product I: CLI Internal: related to the relayer's CLI labels May 27, 2021
@adizere adizere added this to the Backlog milestone May 27, 2021
@adizere adizere changed the title context specific help Hermes context specific help option May 27, 2021
@leejw51crypto
Copy link
Contributor Author

leejw51crypto commented May 28, 2021

global option works, but when user enters command like this

hermes create client
error: missing required free argument

hermes 0.3.2
Informal Systems <hello@informal.systems>
Hermes is an IBC Relayer written in Rust.

FLAGS:
    -c, --config CONFIG       path to configuration file
    -h, --help                print help message
    -j, --json                enable JSON output

--help options looks like

hermes create client --help 

user just add --help to get help messages, it would be handy

@romac
Copy link
Member

romac commented May 28, 2021

Yes, that's an unfortunate limitation of the gumdrop crate that we depend on via abscissa, the CLI framework used to build Hermes. When Abscissa eventually moves to Clap, we'll get a much better command-line UX.

@romac
Copy link
Member

romac commented May 28, 2021

I guess in the meantime we could look into manually adding a --help to all commands and invoke the global Help command with the appropriate arguments.

@leejw51crypto
Copy link
Contributor Author

yes, that would work

@adizere
Copy link
Member

adizere commented May 28, 2021

Yes, that's an unfortunate limitation of the gumdrop crate that we depend on via abscissa, the CLI framework used to build Hermes. When Abscissa eventually moves to Clap, we'll get a much better command-line UX.

I did a quick experiment (#1012) with an alternative fix of modifying the help message, so that Hermes explicitly mentions the help command (instead of mentioning the -h flag, which does not work).

@leejw51crypto @romac could you please have a look over #1012 ?

@adizere adizere modified the milestones: Backlog, 05.2021 May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I: CLI Internal: related to the relayer's CLI O: usability Objective: cause to improve the user experience (UX) and ease using the product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants