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
This commit is contained in:
Lennart Kats (databricks) 2023-12-28 14:14:55 +01:00 committed by GitHub
parent 3b6681c301
commit 206b1bf198
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 10 deletions

View File

@ -6,9 +6,10 @@ import (
func New() *cobra.Command { func New() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "bundle", Use: "bundle",
Short: "Databricks Asset Bundles", Short: "Databricks Asset Bundles let you express data/AI/analytics projects as code.",
Long: "Databricks Asset Bundles\n\nOnline documentation: https://docs.databricks.com/en/dev-tools/bundles", 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) initVariableFlag(cmd)

View File

@ -6,9 +6,10 @@ import (
func New() *cobra.Command { func New() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "fs", Use: "fs",
Short: "Filesystem related commands", Short: "Filesystem related commands",
Long: `Commands to do DBFS operations.`, Long: `Commands to do DBFS operations.`,
GroupID: "workspace",
} }
cmd.AddCommand( cmd.AddCommand(

View File

@ -76,9 +76,10 @@ func (f *syncFlags) syncOptionsFromArgs(cmd *cobra.Command, args []string) (*syn
func New() *cobra.Command { func New() *cobra.Command {
cmd := &cobra.Command{ cmd := &cobra.Command{
Use: "sync [flags] SRC DST", Use: "sync [flags] SRC DST",
Short: "Synchronize a local directory to a workspace directory", Short: "Synchronize a local directory to a workspace directory",
Args: cobra.MaximumNArgs(2), Args: cobra.MaximumNArgs(2),
GroupID: "development",
} }
f := syncFlags{ f := syncFlags{

View File

@ -18,7 +18,7 @@ func Groups() []cobra.Group {
}, },
{ {
ID: "jobs", ID: "jobs",
Title: "Jobs", Title: "Workflows",
}, },
{ {
ID: "pipelines", ID: "pipelines",
@ -52,5 +52,9 @@ func Groups() []cobra.Group {
ID: "settings", ID: "settings",
Title: "Settings", Title: "Settings",
}, },
{
ID: "development",
Title: "Developer Tools",
},
} }
} }