From 323c4d915a17ccfc2d121c9285b3fed53a447863 Mon Sep 17 00:00:00 2001 From: lew Date: Wed, 19 Nov 2025 12:44:04 +0000 Subject: [PATCH] feat(cmds): 's' and 'g' aliases for set and get --- cmd/get.go | 9 +++++---- cmd/set.go | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/cmd/get.go b/cmd/get.go index ad480fc..6013b0d 100644 --- a/cmd/get.go +++ b/cmd/get.go @@ -30,10 +30,11 @@ import ( // getCmd represents the get command var getCmd = &cobra.Command{ - Use: "get KEY[@DB]", - Short: "Get a value for a key. Optionally specify a db.", - Args: cobra.ExactArgs(1), - RunE: get, + Use: "get KEY[@DB]", + Short: "Get a value for a key. Optionally specify a db.", + Aliases: []string{"g"}, + Args: cobra.ExactArgs(1), + RunE: get, } func get(cmd *cobra.Command, args []string) error { diff --git a/cmd/set.go b/cmd/set.go index 0fa1f6c..29989cf 100644 --- a/cmd/set.go +++ b/cmd/set.go @@ -30,10 +30,11 @@ import ( // setCmd represents the set command var setCmd = &cobra.Command{ - Use: "set KEY[@DB] [VALUE]", - Short: "Set a value for a key by passing VALUE or from Stdin. Optionally specify a db.", - Args: cobra.RangeArgs(1, 2), - RunE: set, + Use: "set KEY[@DB] [VALUE]", + 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), + RunE: set, } func set(cmd *cobra.Command, args []string) error {