Skip to content

Commit

Permalink
Disambiguate between help and height flags by using -H for the latter
Browse files Browse the repository at this point in the history
  • Loading branch information
romac authored and mzabaluev committed Jan 4, 2022
1 parent bca2a0f commit e59bb13
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 29 deletions.
2 changes: 1 addition & 1 deletion guide/src/commands/path-setup/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ POSITIONAL ARGUMENTS:
dst_client_id identifier of the client to be updated on destination chain

FLAGS:
-h, --target-height TARGET-HEIGHT
-H, --target-height TARGET-HEIGHT
-t, --trusted-height TRUSTED-HEIGHT
```

Expand Down
6 changes: 3 additions & 3 deletions guide/src/commands/queries/channel.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ POSITIONAL ARGUMENTS:
channel_id identifier of the channel to query

FLAGS:
-h, --height HEIGHT height of the state to query
-H, --height HEIGHT height of the state to query
```

__Example__
Expand Down Expand Up @@ -131,7 +131,7 @@ POSITIONAL ARGUMENTS:
channel_id identifier of the channel to query

FLAGS:
-h, --height HEIGHT height of the state to query
-H, --height HEIGHT height of the state to query
-v, --verbose enable verbose output, displaying all details of channels, connections & clients
```

Expand Down Expand Up @@ -181,4 +181,4 @@ Success: ChannelEndsSummary {
```

Passing the `-v` flag will additionally print all the details of the
channel, connection, and client on both ends.
channel, connection, and client on both ends.
8 changes: 4 additions & 4 deletions guide/src/commands/queries/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ POSITIONAL ARGUMENTS:
client_id identifier of the client to query

FLAGS:
-h, --height HEIGHT the chain height which this query should reflect
-H, --height HEIGHT the chain height which this query should reflect
```

__Example__
Expand Down Expand Up @@ -159,7 +159,7 @@ POSITIONAL ARGUMENTS:
FLAGS:
-c, --consensus-height CONSENSUS-HEIGHT
-s, --heights-only show only consensus heights
-h, --height HEIGHT the chain height context to be used, applicable only to a specific height
-H, --height HEIGHT the chain height context to be used, applicable only to a specific height
```

__Example__
Expand Down Expand Up @@ -235,7 +235,7 @@ POSITIONAL ARGUMENTS:
client_id identifier of the client to query

FLAGS:
-h, --height HEIGHT the chain height which this query should reflect
-H, --height HEIGHT the chain height which this query should reflect
```

__Example__
Expand Down Expand Up @@ -268,7 +268,7 @@ POSITIONAL ARGUMENTS:
consensus_height height of header to query
FLAGS:
-h, --height HEIGHT the chain height context for the query
-H, --height HEIGHT the chain height context for the query
```

__Example__
Expand Down
2 changes: 1 addition & 1 deletion guide/src/commands/queries/connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ POSITIONAL ARGUMENTS:
connection_id identifier of the connection to query

FLAGS:
-h, --height HEIGHT height of the state to query
-H, --height HEIGHT height of the state to query
```

__Example__
Expand Down
4 changes: 2 additions & 2 deletions guide/src/commands/queries/packet.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ POSITIONAL ARGUMENTS:
sequence sequence of packet to query

FLAGS:
-h, --height HEIGHT height of the state to query
-H, --height HEIGHT height of the state to query
```

__Example__
Expand Down Expand Up @@ -154,7 +154,7 @@ POSITIONAL ARGUMENTS:
sequence sequence of packet to query

FLAGS:
-h, --height HEIGHT height of the state to query
-H, --height HEIGHT height of the state to query
```

__Example__
Expand Down
2 changes: 1 addition & 1 deletion guide/src/commands/raw/client.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ POSITIONAL ARGUMENTS:
dst_client_id identifier of the client to be updated on destination chain

FLAGS:
-h, --target-height TARGET-HEIGHT
-H, --target-height TARGET-HEIGHT
-t, --trusted-height TRUSTED-HEIGHT
```

Expand Down
3 changes: 1 addition & 2 deletions relayer-cli/src/commands/query/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ pub struct QueryChannelEndCmd {
#[clap(required = true, about = "identifier of the channel to query")]
channel_id: ChannelId,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "height of the state to query")]
#[clap(short = 'H', long, about = "height of the state to query")]
height: Option<u64>,
}

Expand Down
2 changes: 1 addition & 1 deletion relayer-cli/src/commands/query/channel_ends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct QueryChannelEndsCmd {
channel_id: ChannelId,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "height of the state to query")]
#[clap(short = 'H', long, about = "height of the state to query")]
height: Option<u64>,

#[clap(
Expand Down
10 changes: 4 additions & 6 deletions relayer-cli/src/commands/query/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ pub struct QueryClientStateCmd {
#[clap(required = true, about = "identifier of the client to query")]
client_id: ClientId,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "the chain height context for the query")]
#[clap(short = 'H', long, about = "the chain height context for the query")]
height: Option<u64>,
}

Expand Down Expand Up @@ -84,7 +83,7 @@ pub struct QueryClientConsensusCmd {
heights_only: bool,

#[clap(
short = 'h',
short = 'H',
long,
about = "the chain height context to be used, applicable only to a specific height"
)]
Expand Down Expand Up @@ -172,8 +171,7 @@ pub struct QueryClientHeaderCmd {
#[clap(required = true, about = "height of header to query")]
consensus_height: u64,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "the chain height context for the query")]
#[clap(short = 'H', long, about = "the chain height context for the query")]
height: Option<u64>,
}

Expand Down Expand Up @@ -239,7 +237,7 @@ pub struct QueryClientConnectionsCmd {
client_id: ClientId,

#[clap(
short = 'h',
short = 'H',
long,
about = "the chain height which this query should reflect"
)]
Expand Down
3 changes: 1 addition & 2 deletions relayer-cli/src/commands/query/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ pub struct QueryConnectionEndCmd {
#[clap(required = true, about = "identifier of the connection to query")]
connection_id: ConnectionId,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "height of the state to query")]
#[clap(short = 'H', long, about = "height of the state to query")]
height: Option<u64>,
}

Expand Down
3 changes: 1 addition & 2 deletions relayer-cli/src/commands/query/packet/ack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ pub struct QueryPacketAcknowledgmentCmd {
#[clap(required = true, about = "sequence of packet to query")]
sequence: Sequence,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "height of the state to query")]
#[clap(short = 'H', long, about = "height of the state to query")]
height: Option<u64>,
}

Expand Down
3 changes: 1 addition & 2 deletions relayer-cli/src/commands/query/packet/commitment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ pub struct QueryPacketCommitmentCmd {
#[clap(required = true, about = "sequence of packet to query")]
sequence: Sequence,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "height of the state to query")]
#[clap(short = 'H', long, about = "height of the state to query")]
height: Option<u64>,
}

Expand Down
3 changes: 1 addition & 2 deletions relayer-cli/src/commands/tx/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ pub struct TxUpdateClientCmd {
)]
dst_client_id: ClientId,

// FIXME: rename the short option to avoid confusion with --help?
#[clap(short = 'h', long, about = "the target height of the client update")]
#[clap(short = 'H', long, about = "the target height of the client update")]
target_height: Option<u64>,

#[clap(short = 't', long, about = "the trusted height of the client update")]
Expand Down

0 comments on commit e59bb13

Please sign in to comment.