diff --git a/NEXT_CHANGELOG.md b/NEXT_CHANGELOG.md index 39b3741607..4c456a57ad 100644 --- a/NEXT_CHANGELOG.md +++ b/NEXT_CHANGELOG.md @@ -8,6 +8,7 @@ * `databricks auth describe` now reports where U2M (`databricks-cli`) tokens are stored: `plaintext` (`~/.databricks/token-cache.json`) or `secure` (OS keyring), and the source of the choice (env var, config setting, or default). * Marked the default profile in the interactive pickers shown by `databricks auth switch`, `databricks auth logout`, `databricks auth token`, and `databricks auth login`, and moved it to the top of the list. `databricks auth login` and `databricks auth logout` now offer the same selectors as `databricks auth token` and `databricks auth switch` respectively. * The interactive auth profile pickers now start in search mode so typing immediately filters the list, and the action entries (`+ Create a new profile`, `→ Enter a host URL manually`) are visually distinct from real profiles and stay visible regardless of the search query. +* Shortened the host prompt label shown after `→ Enter a host URL manually` in `databricks auth login` so the prompt no longer leaves stale lines on screen when typing or pasting a host URL. ### Bundles * Stop applying `presets.name_prefix` (and the dev-mode `[dev ]` rename) to `vector_search_endpoints` ([#5209](https://github.com/databricks/cli/pull/5209)). diff --git a/cmd/auth/auth.go b/cmd/auth/auth.go index 28aa1269df..7ef3a9f72a 100644 --- a/cmd/auth/auth.go +++ b/cmd/auth/auth.go @@ -45,8 +45,13 @@ func promptForHost(ctx context.Context) (string, error) { return "", errors.New("the command is being run in a non-interactive environment, please specify a host using --host") } + // The hint is printed separately so the prompt label stays short. + // promptui's screenbuf does not account for terminal line wrapping, and a + // long "label + value" line that wraps causes each keystroke to leave a + // stale render on screen instead of overwriting the previous one. + cmdio.LogString(ctx, "Example: https://.cloud.databricks.com") return cmdio.RunPrompt(ctx, cmdio.PromptOptions{ - Label: "Databricks host (e.g. https://.cloud.databricks.com)", + Label: "Databricks host", }) }