From b71f853649069af3729a8175ba5528be48b64fe3 Mon Sep 17 00:00:00 2001 From: shreyas-goenka <88374338+shreyas-goenka@users.noreply.github.com> Date: Mon, 15 Apr 2024 23:01:00 +0530 Subject: [PATCH] Do not prefill https:// in prompt for Databricks Host (#1364) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Changes This PR is a minor UX improvement. By not autofilling the https:// prefix in Databricks Host we allow users to directly copy-paste from their browser. UX: ``` ➜ cli git:(fix/copy-host) cli auth login Databricks Profile Name: my-profile Databricks Host (e.g. https://.cloud.databricks.com): https://foobar.cloud.databricks.com Profile my-profile was successfully saved ``` ## Tests Manually. --- cmd/auth/auth.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cmd/auth/auth.go b/cmd/auth/auth.go index 947d8940..4af2a7a7 100644 --- a/cmd/auth/auth.go +++ b/cmd/auth/auth.go @@ -35,9 +35,7 @@ GCP: https://docs.gcp.databricks.com/en/dev-tools/auth/index.html`, func promptForHost(ctx context.Context) (string, error) { prompt := cmdio.Prompt(ctx) - prompt.Label = "Databricks Host" - prompt.Default = "https://" - prompt.AllowEdit = true + prompt.Label = "Databricks Host (e.g. https://.cloud.databricks.com)" // Validate? host, err := prompt.Run() if err != nil {