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
26
cmd/mv.go
26
cmd/mv.go
|
|
@ -30,21 +30,23 @@ import (
|
|||
)
|
||||
|
||||
var cpCmd = &cobra.Command{
|
||||
Use: "copy FROM[@STORE] TO[@STORE]",
|
||||
Aliases: []string{"cp"},
|
||||
Short: "Make a copy of a key",
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: cp,
|
||||
SilenceUsage: true,
|
||||
Use: "copy FROM[@STORE] TO[@STORE]",
|
||||
Aliases: []string{"cp"},
|
||||
Short: "Make a copy of a key",
|
||||
Args: cobra.ExactArgs(2),
|
||||
ValidArgsFunction: completeKeys,
|
||||
RunE: cp,
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
var mvCmd = &cobra.Command{
|
||||
Use: "move FROM[@STORE] TO[@STORE]",
|
||||
Aliases: []string{"mv"},
|
||||
Short: "Move a key",
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: mv,
|
||||
SilenceUsage: true,
|
||||
Use: "move FROM[@STORE] TO[@STORE]",
|
||||
Aliases: []string{"mv"},
|
||||
Short: "Move a key",
|
||||
Args: cobra.ExactArgs(2),
|
||||
ValidArgsFunction: completeKeys,
|
||||
RunE: mv,
|
||||
SilenceUsage: true,
|
||||
}
|
||||
|
||||
func cp(cmd *cobra.Command, args []string) error {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue