From f67c62230036872f42c4af6a76caefc4cf582967 Mon Sep 17 00:00:00 2001 From: 5ouma <101255979+5ouma@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:04:26 +0900 Subject: [PATCH] chore(cobra): Add Cobra options to improve user experience Command execution log becomes much better. --- cmd/command.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/command.go b/cmd/command.go index 233b32f..e09d2f0 100644 --- a/cmd/command.go +++ b/cmd/command.go @@ -21,10 +21,12 @@ func New() *cmd { }, loginItems: new(lib.LoginItems), } + cmd.command.CompletionOptions.HiddenDefaultCmd = true cmd.command.SetVersionTemplate("📑 {{.Use}} {{.Version}}\n") + cmd.command.SetErrPrefix("🚨") cmd.command.AddCommand( - cmd.newSaveCmd(), cmd.newLoadCmd(), + cmd.newSaveCmd(), ) return cmd }