Point users at shell completion setup on first start - #484
Open
joe4dev wants to merge 3 commits into
Open
Conversation
joe4dev
marked this pull request as ready for review
September 4, 2026 14:25
joe4dev
force-pushed
the
devx-821-completion-tip
branch
from
September 7, 2026 09:28
3df75be to
6d5ed2a
Compare
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
joe4dev
force-pushed
the
devx-821-completion-tip
branch
from
September 7, 2026 10:07
6d5ed2a to
3039a2b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Only Homebrew installs get shell completion set up automatically (
homebrew_casks.completions). npm and GitHub-release users have to find the docs themselves, so a shipped time-saving feature goes mostly unused.Solution
Emit one line after the first successful interactive start, pointing at
lstk completion [bash|zsh|fish|powershell]and the docs section:Two deliberate deviations from the ticket: the trigger is the first run, not install (no install path offers a usable hook — npm's
package.jsonis generated, apostinstallthat edits a shell rc is hostile and is skipped under--ignore-scripts, and binary installs have no hook), and it is a pointer, not a prompt — lstk never writes to the user's shell config. An automatedlstk completion --writewas designed and dropped in favour of this because the big complexity (cross-platform, cross-shell, cross-install-method) is not worth maintaining for a small gain.Needs no new persisted state:
firstRunmeans "config.toml was absent", and that same path creates the config, so the tip cannot repeat. Interactive-only, so CI and--jsonoutput are unchanged. Prefix and severity matchtipsForType, whose tip renders directly above it.The wording follows the
Verb ...: <command>shape the neighbouring tips already use.The
main_test.go/awsconfig_test.gopart of the diff is test plumbing: these tests isolateHOMEundert.TempDir()and start a real emulator, whose container writes root-owned files into the bind-mounted volume that Go'sTempDircleanup cannot delete on Linux.awsconfig_test.goalready solved this;scheduleVolumeCleanupextracts it so there is one copy rather than two.Manual testing
Screenshot from manual testing:
Docs
No documentation change needed — the tip points at the existing "Shell completions" section and adds no command, flag, or env var. Worth knowing that the CLI now links to that section directly, so the
#shell-completionsanchor should stay stable.Review
Human review advised — new user-facing output on the shared start path.
Todo
Closes DEVX-821