From 6b5052489e6704a33967563aa7edec2501521e5c Mon Sep 17 00:00:00 2001 From: David Dworken Date: Sun, 11 Aug 2024 11:41:51 -0700 Subject: [PATCH] Add config-get compact-mode command (as needed by #237) --- client/cmd/configGet.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/client/cmd/configGet.go b/client/cmd/configGet.go index 8a08b14..f2f98c6 100644 --- a/client/cmd/configGet.go +++ b/client/cmd/configGet.go @@ -146,6 +146,16 @@ var getColorScheme = &cobra.Command{ }, } +var getCompactMode = &cobra.Command{ + Use: "compact-mode", + Short: "Get whether the TUI is running in compact mode to minimize wasted terminal space", + Run: func(cmd *cobra.Command, args []string) { + ctx := hctx.MakeContext() + config := hctx.GetConf(ctx) + fmt.Println(config.ForceCompactMode) + }, +} + var getAiCompletionEndpoint = &cobra.Command{ Use: "ai-completion-endpoint", Short: "The AI endpoint to use for AI completions", @@ -170,4 +180,5 @@ func init() { configGetCmd.AddCommand(getColorScheme) configGetCmd.AddCommand(getDefaultFilterCmd) configGetCmd.AddCommand(getAiCompletionEndpoint) + configGetCmd.AddCommand(getCompactMode) }