diff --git a/cmd/ls.go b/cmd/ls.go index 5889583..f94eee1 100644 --- a/cmd/ls.go +++ b/cmd/ls.go @@ -14,7 +14,8 @@ var ( func init() { fs := flag.NewFlagSet("toggle", flag.ExitOnError) - fs.String("selector", "all", "Set the selector") + selector := fs.String("selector", "all", "Set the selector") + fs.StringVar(selector, "s", "all", "Set the selector") RegisterCommand("ls", Command{ Func: LsCmd, diff --git a/cmd/toggle.go b/cmd/toggle.go index 950fb19..ba0be80 100644 --- a/cmd/toggle.go +++ b/cmd/toggle.go @@ -9,8 +9,10 @@ import ( func init() { fs := flag.NewFlagSet("toggle", flag.ExitOnError) - fs.Float64("duration", 1.0, "Set the duration") - fs.String("selector", "all", "Set the selector") + duration := fs.Float64("duration", 1.0, "Set the duration") + fs.Float64Var(duration, "d", 1.0, "Set the duration") + selector := fs.String("selector", "all", "Set the selector") + fs.StringVar(selector, "s", "all", "Set the selector") RegisterCommand("toggle", Command{ Func: ToggleCmd,