From 206b1bf198d7f1f557e0fda6a7733a7e45770a85 Mon Sep 17 00:00:00 2001 From: "Lennart Kats (databricks)" Date: Thu, 28 Dec 2023 14:14:55 +0100 Subject: [PATCH] Tweak command groups in CLI help (#1092) ## Changes This tweaks the help output shown when using `databricks help`: * make`jobs` appears under `Workflows` (as done in baseline OpenAPI). * move `bundle` and `sync` under a new group called `Developer Tools` (similar to what we have in docs) * minor wording changes --- cmd/bundle/bundle.go | 7 ++++--- cmd/fs/fs.go | 7 ++++--- cmd/sync/sync.go | 7 ++++--- cmd/workspace/groups.go | 6 +++++- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/cmd/bundle/bundle.go b/cmd/bundle/bundle.go index 128c8302..3206b94e 100644 --- a/cmd/bundle/bundle.go +++ b/cmd/bundle/bundle.go @@ -6,9 +6,10 @@ import ( func New() *cobra.Command { cmd := &cobra.Command{ - Use: "bundle", - Short: "Databricks Asset Bundles", - Long: "Databricks Asset Bundles\n\nOnline documentation: https://docs.databricks.com/en/dev-tools/bundles", + Use: "bundle", + Short: "Databricks Asset Bundles let you express data/AI/analytics projects as code.", + Long: "Databricks Asset Bundles let you express data/AI/analytics projects as code.\n\nOnline documentation: https://docs.databricks.com/en/dev-tools/bundles", + GroupID: "development", } initVariableFlag(cmd) diff --git a/cmd/fs/fs.go b/cmd/fs/fs.go index 190220f4..01d8a745 100644 --- a/cmd/fs/fs.go +++ b/cmd/fs/fs.go @@ -6,9 +6,10 @@ import ( func New() *cobra.Command { cmd := &cobra.Command{ - Use: "fs", - Short: "Filesystem related commands", - Long: `Commands to do DBFS operations.`, + Use: "fs", + Short: "Filesystem related commands", + Long: `Commands to do DBFS operations.`, + GroupID: "workspace", } cmd.AddCommand( diff --git a/cmd/sync/sync.go b/cmd/sync/sync.go index f00c02a8..c613e8ca 100644 --- a/cmd/sync/sync.go +++ b/cmd/sync/sync.go @@ -76,9 +76,10 @@ func (f *syncFlags) syncOptionsFromArgs(cmd *cobra.Command, args []string) (*syn func New() *cobra.Command { cmd := &cobra.Command{ - Use: "sync [flags] SRC DST", - Short: "Synchronize a local directory to a workspace directory", - Args: cobra.MaximumNArgs(2), + Use: "sync [flags] SRC DST", + Short: "Synchronize a local directory to a workspace directory", + Args: cobra.MaximumNArgs(2), + GroupID: "development", } f := syncFlags{ diff --git a/cmd/workspace/groups.go b/cmd/workspace/groups.go index 43159d18..b1505e77 100644 --- a/cmd/workspace/groups.go +++ b/cmd/workspace/groups.go @@ -18,7 +18,7 @@ func Groups() []cobra.Group { }, { ID: "jobs", - Title: "Jobs", + Title: "Workflows", }, { ID: "pipelines", @@ -52,5 +52,9 @@ func Groups() []cobra.Group { ID: "settings", Title: "Settings", }, + { + ID: "development", + Title: "Developer Tools", + }, } }