Skip to content

Commit

Permalink
feat(cli): support CLI completion (#2017)
Browse files Browse the repository at this point in the history
enables the underlying cobra CLI completion scripts.

supported shells:
* Bash
* Zsh
* Fish
* PowerShell

this replaces (and un-hides) the previously existing tendermint
completion command that only supported bash & zsh.

see `kava completion <shell> --help` for specifics

(cherry picked from commit 8ac4c5d)

# Conflicts:
#	CHANGELOG.md
#	cmd/kava/cmd/root.go
  • Loading branch information
pirtleshell authored and mergify[bot] committed Sep 6, 2024
1 parent 0853cc7 commit cf7c6d6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ Ref: https://keepachangelog.com/en/1.0.0/
## [v0.26.2]

### Features
<<<<<<< HEAD
- (cli) [#1954] Add `--unsafe-remove-modules` parameter flag to `rollback`
- (opendb) [#1973] Support custom configurations for each database
see https://github.com/Kava-Labs/opendb/blob/a2f11f6d/README.md#individual-database-configuration
=======
- (precisebank) [#1906] Add new `x/precisebank` module with bank decimal extension for EVM usage.
- (cli) [#1922] Add `iavlviewer` CLI command for low-level iavl db debugging.
- (cli) [#2017] Support CLI `completion` for bash, zsh, fish, & powershell.
>>>>>>> 8ac4c5d0 (feat(cli): support CLI completion (#2017))
### Improvements
- (rocksdb) [#1903] Bump cometbft-db dependency for use with rocksdb v8.10.0
Expand Down Expand Up @@ -350,9 +356,14 @@ the [changelog](https://github.com/cosmos/cosmos-sdk/blob/v0.38.4/CHANGELOG.md).
- [#257](https://github.com/Kava-Labs/kava/pulls/257) Include scripts to run
large-scale simulations remotely using aws-batch

<<<<<<< HEAD
[#1973]: https://github.com/Kava-Labs/kava/pull/1973
[#1967]: https://github.com/Kava-Labs/kava/pull/1967
[#1954]: https://github.com/Kava-Labs/kava/pull/1954
=======
[#2017]: https://github.com/Kava-Labs/kava/pull/2017
[#1988]: https://github.com/Kava-Labs/kava/pull/1988
>>>>>>> 8ac4c5d0 (feat(cli): support CLI completion (#2017))
[#1922]: https://github.com/Kava-Labs/kava/pull/1922
[#1903]: https://github.com/Kava-Labs/kava/pull/1903
[#1851]: https://github.com/Kava-Labs/kava/pull/1851
Expand Down
7 changes: 5 additions & 2 deletions cmd/kava/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import (
"os"
"path/filepath"

<<<<<<< HEAD

Check failure on line 8 in cmd/kava/cmd/root.go

View workflow job for this annotation

GitHub Actions / default / validate-protonet-genesis

missing import path

Check failure on line 8 in cmd/kava/cmd/root.go

View workflow job for this annotation

GitHub Actions / default / test

missing import path

Check failure on line 8 in cmd/kava/cmd/root.go

View workflow job for this annotation

GitHub Actions / default / build

missing import path

Check failure on line 8 in cmd/kava/cmd/root.go

View workflow job for this annotation

GitHub Actions / rocksdb / build

missing import path
=======
dbm "github.com/cometbft/cometbft-db"
tmcfg "github.com/cometbft/cometbft/config"
>>>>>>> 8ac4c5d0 (feat(cli): support CLI completion (#2017))
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
"github.com/cosmos/cosmos-sdk/client/debug"
Expand Down Expand Up @@ -115,8 +120,6 @@ func addSubCmds(rootCmd *cobra.Command, encodingConfig params.EncodingConfig, de
genutilcli.GenTxCmd(app.ModuleBasics, encodingConfig.TxConfig, banktypes.GenesisBalancesIterator{}, defaultNodeHome),
genutilcli.ValidateGenesisCmd(app.ModuleBasics),
AddGenesisAccountCmd(defaultNodeHome),
tmcli.NewCompletionCmd(rootCmd, true), // TODO add other shells, drop tmcli dependency, unhide?
// testnetCmd(app.ModuleBasics, banktypes.GenesisBalancesIterator{}), // TODO add
debug.Cmd(),
config.Cmd(),
)
Expand Down

0 comments on commit cf7c6d6

Please sign in to comment.