Skip to content

lakebox: tab completion for sandbox IDs and ssh-key hashes#5310

Open
akshaysingla-db wants to merge 1 commit into
databricks:demo-lakeboxfrom
akshaysingla-db:akshay/lakebox-completion
Open

lakebox: tab completion for sandbox IDs and ssh-key hashes#5310
akshaysingla-db wants to merge 1 commit into
databricks:demo-lakeboxfrom
akshaysingla-db:akshay/lakebox-completion

Conversation

@akshaysingla-db
Copy link
Copy Markdown
Collaborator

Wire ValidArgsFunction on every lakebox subcommand that takes a positional argument so shells with cobra completion sourced suggest real IDs instead of falling back to filename completion:

  • ssh / status / stop / start / delete / config / set-default — sandbox IDs
  • ssh-key delete — registered key hashes

Surfaced through the existing databricks completion bash|zsh|fish subcommand. Completion is best-effort — silently returns no suggestions on any error so the shell stays usable.

Stacked on top of # (start + ssh fail-fast) since start needs to participate in completion too.

Co-authored-by: Isaac

Changes

Why

Tests

Wire `ValidArgsFunction` on every lakebox subcommand that takes a
positional argument so shells with cobra completion sourced suggest
real IDs instead of falling back to filename completion:

- ssh / status / stop / start / delete / config / set-default — sandbox IDs
- ssh-key delete — registered key hashes

Surfaced through the existing `databricks completion bash|zsh|fish`
subcommand. Completion is best-effort — silently returns no
suggestions on any error so the shell stays usable.

Stacked on top of #<PR-A-NUM> (start + ssh fail-fast) since `start`
needs to participate in completion too.

Co-authored-by: Isaac
@github-actions
Copy link
Copy Markdown
Contributor

Waiting for approval

Based on git history, these people are best suited to review:

  • @pietern -- recent work in cmd/lakebox/

Eligible reviewers: @andrewnester, @anton-107, @denik, @renaudhartert-db, @shreyas-goenka, @simonfaltum

Suggestions based on git history. See OWNERS for ownership rules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant