Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

No tab completion in CLI #8879

Closed
garious opened this issue Mar 15, 2020 · 2 comments · Fixed by #18931
Closed

No tab completion in CLI #8879

garious opened this issue Mar 15, 2020 · 2 comments · Fixed by #18931

Comments

@garious
Copy link
Contributor

garious commented Mar 15, 2020

Problem

No tab completion in CLI, forcing me to ask for --help more than I'd like.

Proposed Solution

https://clap.rs/2016/10/25/an-update/#completionscriptgenerationinclap

@garious garious added this to the The Future! milestone Mar 15, 2020
@stale
Copy link

stale bot commented Mar 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Mar 20, 2021
@CriesofCarrots CriesofCarrots removed the stale [bot only] Added to stale content; results in auto-close after a week. label Mar 30, 2021
theonekeyg added a commit to theonekeyg/solana that referenced this issue Jul 27, 2021

Verified

This commit was signed with the committer’s verified signature.
pentschev Peter Andreas Entschev
…and solana-labs#14005)

Implement `completion` SubCommand for solana-cli, which outputs
completion script to stdout and exits the process. The script generation
handled completely by clap.

In order to implement the generation, one minor design change was
necessary regarding the creation of clap `App`.

Previously: One part of App initialization was in the `app` function,
and some other arguments and subcommands were added later directly in
the `main` function.

Now: The whole construction of App was moved to `get_clap_app` function.

P.S. I wasn't sure if constructing App separately had visual importance,
so both constructing parts are still separate in `base_clap_app` and
`final_clap_app` functions. But they sure could be in one single
function.
CriesofCarrots pushed a commit that referenced this issue Jul 28, 2021

Verified

This commit was signed with the committer’s verified signature.
pentschev Peter Andreas Entschev
… (#18931)

* Auto-generate shell completions for solana-cli (issue #8879 and #14005)

Implement `completion` SubCommand for solana-cli, which outputs
completion script to stdout and exits the process. The script generation
handled completely by clap.

In order to implement the generation, one minor design change was
necessary regarding the creation of clap `App`.

Previously: One part of App initialization was in the `app` function,
and some other arguments and subcommands were added later directly in
the `main` function.

Now: The whole construction of App was moved to `get_clap_app` function.

P.S. I wasn't sure if constructing App separately had visual importance,
so both constructing parts are still separate in `base_clap_app` and
`final_clap_app` functions. But they sure could be in one single
function.

* Dereplicode match expr, fix clippy warning.

* Move clap App construction into separate module

Also join two parts of the construction into a single function

* Fix tests

* Apply rustfmt lints
mergify bot pushed a commit that referenced this issue Jul 28, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
… (#18931)

* Auto-generate shell completions for solana-cli (issue #8879 and #14005)

Implement `completion` SubCommand for solana-cli, which outputs
completion script to stdout and exits the process. The script generation
handled completely by clap.

In order to implement the generation, one minor design change was
necessary regarding the creation of clap `App`.

Previously: One part of App initialization was in the `app` function,
and some other arguments and subcommands were added later directly in
the `main` function.

Now: The whole construction of App was moved to `get_clap_app` function.

P.S. I wasn't sure if constructing App separately had visual importance,
so both constructing parts are still separate in `base_clap_app` and
`final_clap_app` functions. But they sure could be in one single
function.

* Dereplicode match expr, fix clippy warning.

* Move clap App construction into separate module

Also join two parts of the construction into a single function

* Fix tests

* Apply rustfmt lints

(cherry picked from commit 9d0a937)
mergify bot added a commit that referenced this issue Jul 28, 2021
… (#18931) (#18945)

* Auto-generate shell completions for solana-cli (issue #8879 and #14005)

Implement `completion` SubCommand for solana-cli, which outputs
completion script to stdout and exits the process. The script generation
handled completely by clap.

In order to implement the generation, one minor design change was
necessary regarding the creation of clap `App`.

Previously: One part of App initialization was in the `app` function,
and some other arguments and subcommands were added later directly in
the `main` function.

Now: The whole construction of App was moved to `get_clap_app` function.

P.S. I wasn't sure if constructing App separately had visual importance,
so both constructing parts are still separate in `base_clap_app` and
`final_clap_app` functions. But they sure could be in one single
function.

* Dereplicode match expr, fix clippy warning.

* Move clap App construction into separate module

Also join two parts of the construction into a single function

* Fix tests

* Apply rustfmt lints

(cherry picked from commit 9d0a937)

Co-authored-by: theonekeyg <34949189+theonekeyg@users.noreply.github.com>
@github-actions
Copy link
Contributor

github-actions bot commented Apr 2, 2022

This issue has been automatically locked since there has not been any activity in past 7 days after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 2, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants