feat(completions): wire up key completions for key commands
This commit is contained in:
parent
84b1c67c72
commit
bc0b98c7f9
5 changed files with 32 additions and 25 deletions
12
cmd/get.go
12
cmd/get.go
|
|
@ -46,9 +46,10 @@ additional argument after the initial KEY being fetched.
|
|||
For example:
|
||||
pda set greeting 'Hello, {{ .NAME }}!'
|
||||
pda get greeting NAME=World`,
|
||||
Aliases: []string{"g"},
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
RunE: get,
|
||||
Aliases: []string{"g"},
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
ValidArgsFunction: completeKeys,
|
||||
RunE: get,
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
|
|
@ -63,8 +64,9 @@ additional argument after the initial KEY being fetched.
|
|||
For example:
|
||||
pda set greeting 'Hello, {{ .NAME }}!'
|
||||
pda run greeting NAME=World`,
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
RunE: run,
|
||||
Args: cobra.MinimumNArgs(1),
|
||||
ValidArgsFunction: completeKeys,
|
||||
RunE: run,
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue