feat(cmds): 's' and 'g' aliases for set and get
This commit is contained in:
parent
28582bc0b2
commit
323c4d915a
2 changed files with 10 additions and 8 deletions
|
|
@ -32,6 +32,7 @@ import (
|
||||||
var getCmd = &cobra.Command{
|
var getCmd = &cobra.Command{
|
||||||
Use: "get KEY[@DB]",
|
Use: "get KEY[@DB]",
|
||||||
Short: "Get a value for a key. Optionally specify a db.",
|
Short: "Get a value for a key. Optionally specify a db.",
|
||||||
|
Aliases: []string{"g"},
|
||||||
Args: cobra.ExactArgs(1),
|
Args: cobra.ExactArgs(1),
|
||||||
RunE: get,
|
RunE: get,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ import (
|
||||||
var setCmd = &cobra.Command{
|
var setCmd = &cobra.Command{
|
||||||
Use: "set KEY[@DB] [VALUE]",
|
Use: "set KEY[@DB] [VALUE]",
|
||||||
Short: "Set a value for a key by passing VALUE or from Stdin. Optionally specify a db.",
|
Short: "Set a value for a key by passing VALUE or from Stdin. Optionally specify a db.",
|
||||||
|
Aliases: []string{"s"},
|
||||||
Args: cobra.RangeArgs(1, 2),
|
Args: cobra.RangeArgs(1, 2),
|
||||||
RunE: set,
|
RunE: set,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue