From c2c479b36c816401c29e7b4134aacecf1ce3f375 Mon Sep 17 00:00:00 2001 From: Chris Lane Date: Wed, 2 Sep 2020 17:17:44 -0400 Subject: [PATCH] feat: support `-t` shorthand Make `cheat -t ` function as a shorthand for `cheat -l -t `. --- cmd/cheat/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/cheat/main.go b/cmd/cheat/main.go index 23ca794..cd7b5a1 100755 --- a/cmd/cheat/main.go +++ b/cmd/cheat/main.go @@ -185,6 +185,9 @@ func main() { case opts[""] != nil: cmd = cmdView + case opts["--tag"] != nil && opts["--tag"].(string) != "": + cmd = cmdList + default: fmt.Println(usage()) os.Exit(0)