From 92c20fdae643d70a33d1a7e3b34f6a1338cf5e44 Mon Sep 17 00:00:00 2001 From: Patrick Devine Date: Thu, 28 Sep 2023 14:19:45 -0700 Subject: [PATCH] fix error messages for unknown commands in the repl (#611) --- cmd/cmd.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/cmd.go b/cmd/cmd.go index d5d1a06a..bbb354a0 100644 --- a/cmd/cmd.go +++ b/cmd/cmd.go @@ -635,6 +635,8 @@ func generateInteractive(cmd *cobra.Command, model string) error { } else { usage() } + default: + fmt.Printf("Unknown command '/set %s'. Type /? for help\n", args[1]) } } else { usage() @@ -659,7 +661,7 @@ func generateInteractive(cmd *cobra.Command, model string) error { case "template": fmt.Println(resp.Template) default: - fmt.Println("error: unknown command") + fmt.Printf("Unknown command '/show %s'. Type /? for help\n", args[1]) } } else { usage()