Skip to content

feat: refine shell completion UX#33

Merged
francoischalifour merged 2 commits into
mainfrom
fc/improve-completion-command-ux
Jul 9, 2026
Merged

feat: refine shell completion UX#33
francoischalifour merged 2 commits into
mainfrom
fc/improve-completion-command-ux

Conversation

@francoischalifour

Copy link
Copy Markdown
Member

The CLI already had a strong altertable completion install flow that writes shell completion files and updates shell startup files where needed. The weaker part was the default altertable completion behavior: it generated raw completion script output, which is useful for manual installs but surprising for users who run the command looking for setup guidance.

This branch makes completion setup more task-oriented:

  • altertable completion install remains the primary path.
  • altertable completion generate <shell> becomes the explicit manual/raw-script path.
  • altertable completion <shell> remains supported as a compatibility alias.
  • Bare altertable completion becomes user-facing guidance instead of dumping a script.

Preview

image

Proposed Solution

This change splits the completion command into clearer entry points:

altertable completion
├── install [bash|fish|zsh]
├── generate bash|fish|zsh
└── bash|fish|zsh  # compatibility raw-script aliases

The root completion command now behaves according to context:

  • In an interactive terminal, it opens a small install-focused prompt using the existing @clack/prompts abstraction.
  • In non-interactive mode, it prints concise setup guidance.
  • In JSON/agent mode, it emits the same guidance as structured data.
  • It no longer prints raw shell scripts unless the user explicitly invokes generate <shell> or a compatibility shell alias.

The implementation keeps raw script generation on leaf commands only. The generate node is a plain group command, while generate bash, generate zsh, and generate fish own the raw stdout behavior. This keeps operation metadata accurate and avoids unnecessary usage-renderer or command-context changes.

Make the completion command install-first while keeping raw script generation behind explicit generate entry points. Bare completion now gives guidance or an interactive install menu, completion generate can infer the current shell, and generated help can show optional shell usage. Update README, command-tree notes, generated script comments, and focused completion coverage.
@francoischalifour francoischalifour changed the title fix: refine shell completion UX feat: refine shell completion UX Jul 9, 2026
@francoischalifour francoischalifour merged commit bd2c605 into main Jul 9, 2026
10 checks passed
@francoischalifour francoischalifour deleted the fc/improve-completion-command-ux branch July 9, 2026 12:29
@github-actions github-actions Bot mentioned this pull request Jul 9, 2026
francoischalifour added a commit that referenced this pull request Jul 9, 2026
🤖 I have created a release *beep* *boop*
---


## 1.0.0 (2026-07-09)


### Features

* add `altertable duckdb` command
([#27](#27))
([e114b11](e114b11))
* add `schema` command
([#21](#21))
([f713a80](f713a80))
* add first-class profile workflows and OAuth login profiles
([#23](#23))
([3ce655f](3ce655f))
* add one-shot shell completion installer
([#9](#9))
([3984fe8](3984fe8))
* auto-provision ephemeral lakehouse credentials after login
([#22](#22))
([d9d815f](d9d815f))
* avoid `--statement` flag for query
([#26](#26))
([23c5dc8](23c5dc8))
* **cli:** add origin-aware CLI update command
([#18](#18))
([5077028](5077028))
* **cli:** support lakehouse upsert endpoint
([#5](#5))
([d6ec3b8](d6ec3b8))
* implement `login` command
([#20](#20))
([1300577](1300577))
* improve human and agent experience
([#8](#8))
([135414f](135414f))
* refine shell completion UX
([#33](#33))
([bd2c605](bd2c605))
* replace `configure` by `profile --configure`
([#28](#28))
([fcf05b5](fcf05b5))


### Bug Fixes

* **api:** normalize api args to ensure the HTTP verb is optional
([#11](#11))
([78b32df](78b32df))
* **api:** prevent wide API tables from soft-wrapping
([#13](#13))
([56fbeb6](56fbeb6))
* **ci:** verify executable step path
([#1](#1))
([4044001](4044001))
* **cli:** remove active context from usage output
([#32](#32))
([9d2a4ad](9d2a4ad))
* **lakehouse:** allow append task without append row flags
([#19](#19))
([6ded957](6ded957))
* main concurrent merge issue
([#37](#37))
([335252c](335252c))
* tighten body validation and stream timeout handling
([#16](#16))
([4c4ce08](4c4ce08))
* validate lakehouse upload files before streaming the payload
([#15](#15))
([0e49b6e](0e49b6e))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: François Chalifour <francoischalifour@users.noreply.github.com>
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.

2 participants