databricks-cli/cmd
Miles Yucht d9ab465ff9
Infer host from profile during login (#629)
## Changes
A pretty annoying part of the current CLI experience is that when
logging in with `databricks auth login`, you always need to type the
name of the host. This seems unnecessary if you have already logged into
a host before, since the CLI can read the previous host from your
`.databrickscfg` file.

This change handles this case by setting the host if unspecified to the
host in the corresponding profile. Combined with autocomplete, this
makes the login process simple:
```
databricks auth login --profile prof<tab><enter>
```

## Tests
Logged in to an existing profile by running the above command (but for a
real profile I had).
2023-08-02 09:43:42 +00:00
..
account Bump OpenAPI specification & Go SDK Version (#624) 2023-08-01 12:33:19 +00:00
api Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
auth Infer host from profile during login (#629) 2023-08-02 09:43:42 +00:00
bundle Add validation for Git settings in bundles (#578) 2023-07-30 12:44:33 +00:00
configure Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
fs Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
root Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
sync Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
version Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00
workspace Bump OpenAPI specification & Go SDK Version (#624) 2023-08-01 12:33:19 +00:00
cmd.go Remove dependency on global state for remaining commands (#613) 2023-07-27 10:03:08 +00:00