databricks-cli/libs/databrickscfg
Pieter Noordhuis e4415bfbcf
Tweak profile prompt (#454)
## Changes

This includes the following changes:
* Move profile loading code to libs/databrickscfg and add tests
* Update prompt label to reflect workspace/account profiles
* Start prompt in search mode by default
* Custom error if `~/.databrickscfg` doesn't exist
* Custom error if `~/.databrickscfg` doesn't contain profiles
* Use stderr for prompt so that stdout redirection works (e.g. with `jq` or `jless`)

## Tests

* New unit tests pass
* Manual tests for both workspace and account commands
* Search-by-default is really nice if you have many profiles
2023-06-09 13:56:35 +02:00
..
testdata Add profile on `databricks auth login` (#423) 2023-06-02 13:49:39 +02:00
host.go Try to resolve a profile if only the host is specified (#287) 2023-03-29 20:44:19 +02:00
host_test.go Try to resolve a profile if only the host is specified (#287) 2023-03-29 20:44:19 +02:00
loader.go Add profile on `databricks auth login` (#423) 2023-06-02 13:49:39 +02:00
loader_test.go Add profile on `databricks auth login` (#423) 2023-06-02 13:49:39 +02:00
ops.go Add profile on `databricks auth login` (#423) 2023-06-02 13:49:39 +02:00
ops_test.go Add profile on `databricks auth login` (#423) 2023-06-02 13:49:39 +02:00
profiles.go Tweak profile prompt (#454) 2023-06-09 13:56:35 +02:00
profiles_test.go Tweak profile prompt (#454) 2023-06-09 13:56:35 +02:00