-
Notifications
You must be signed in to change notification settings - Fork 100
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe.
A lot of Bash CLI tools provide a command line option to output a completion script. For example, ripgrep provides an option:
$ rg --generate=complete-bash | head -5
_rg() {
local i cur prev opts cmds
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
This can be called in a .bashrc file, to enable command line completion:
source <(rg --generate=complete-bash)
It would be nice if Amber supported this.
Describe the solution you'd like
Since we already use the clap library, we can use the complementary clap_complete library to do this.
Describe alternatives you've considered
N/A
Additional context
See https://docs.rs/clap_complete/latest/clap_complete/ for more details.
FedericoCeratto
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request