-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feature/bash_fish_power_shells_completions #401
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
TabishB
merged 23 commits into
Fission-AI:main
from
noameron:feature/bash_fish_power_shells_completions
Jan 9, 2026
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
e89f79e
added CLI completions support for: bash, fish and powershell
noameron ad53abc
Add bash/fish/powershell completions
noameron 07cad96
Archive extend-shell-completions
noameron 0bac2e3
Archive extend-shell-completions
noameron 5524026
Merge branch 'main' into feature/bash_fish_power_shells_completions
noameron 9dd9962
Fix canWriteFile control flow and add tests
noameron f69feab
Merge branch 'main' into feature/bash_fish_power_shells_completions
noameron d9b4ae6
Fix bash completion fallback and security escaping
noameron 71f434b
Merge remote-tracking branch 'origin/feature/bash_fish_power_shells_c…
noameron aaf65a2
Merge branch 'main' into feature/bash_fish_power_shells_completions
noameron f624d3f
refactor: extract completion templates and standardize naming
noameron fadb83b
docs: update spec to reflect multi-shell support
noameron 311b99d
fix: add all shells to zsh completion suggestions
noameron a597dc9
feat: add --yes flag to completion uninstall
noameron b9255cf
fix: remove bash-completion dependency from fallback
noameron f47632a
fix: use printf instead of echo for Fish tab output
noameron 291d0ee
fix: make UX messages shell-aware
noameron f192da5
fix: add Homebrew paths for bash-completion detection
noameron 28f47db
fix: support both PowerShell Core and Windows PS 5.1
noameron 94123dd
fix: preserve colon handling in bash completion
noameron 6e6903a
fix: update completion tests to match implementation changes
noameron 3322198
Merge branch 'main' into feature/bash_fish_power_shells_completions
noameron 21641b5
Merge branch 'main' into feature/bash_fish_power_shells_completions
TabishB File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
15 changes: 15 additions & 0 deletions
15
openspec/changes/archive/2025-12-23-extend-shell-completions/proposal.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # Change Proposal: Extend Shell Completions | ||
|
|
||
| ## Why | ||
|
|
||
| Zsh completions provide an excellent developer experience, but many developers use bash, fish, or PowerShell. Extending completion support to these shells removes friction for the majority of developers who don't use Zsh. | ||
|
|
||
| ## What Changes | ||
|
|
||
| This change adds bash, fish, and PowerShell completion support following the same architectural patterns, documentation methodology, and testing rigor established for Zsh completions. | ||
|
|
||
| ## Deltas | ||
|
|
||
| - **Spec:** `cli-completion` | ||
| - **Operation:** MODIFIED | ||
| - **Description:** Extend completion generation, installation, and testing requirements to support bash, fish, and PowerShell while maintaining the existing Zsh implementation and architectural patterns |
328 changes: 328 additions & 0 deletions
328
...hanges/archive/2025-12-23-extend-shell-completions/specs/cli-completion/spec.md
Large diffs are not rendered by default.
Oops, something went wrong.
49 changes: 49 additions & 0 deletions
49
openspec/changes/archive/2025-12-23-extend-shell-completions/tasks.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Implementation Tasks | ||
|
|
||
| ## Phase 1: Foundation and Bash Support | ||
|
|
||
| - [x] Update `SupportedShell` type in `src/utils/shell-detection.ts` to include `'bash' | 'fish' | 'powershell'` | ||
| - [x] Extend shell detection logic to recognize bash, fish, and PowerShell from environment variables | ||
| - [x] Create `src/core/completions/generators/bash-generator.ts` implementing `CompletionGenerator` interface | ||
| - [x] Create `src/core/completions/installers/bash-installer.ts` implementing `CompletionInstaller` interface | ||
| - [x] Update `CompletionFactory.createGenerator()` to support bash | ||
| - [x] Update `CompletionFactory.createInstaller()` to support bash | ||
| - [x] Create test file `test/core/completions/generators/bash-generator.test.ts` mirroring zsh test structure | ||
| - [x] Create test file `test/core/completions/installers/bash-installer.test.ts` mirroring zsh test structure | ||
| - [x] Verify bash completions work manually: `openspec completion install bash && exec bash` | ||
|
|
||
| ## Phase 2: Fish Support | ||
|
|
||
| - [x] Create `src/core/completions/generators/fish-generator.ts` implementing `CompletionGenerator` interface | ||
| - [x] Create `src/core/completions/installers/fish-installer.ts` implementing `CompletionInstaller` interface | ||
| - [x] Update `CompletionFactory.createGenerator()` to support fish | ||
| - [x] Update `CompletionFactory.createInstaller()` to support fish | ||
| - [x] Create test file `test/core/completions/generators/fish-generator.test.ts` | ||
| - [x] Create test file `test/core/completions/installers/fish-installer.test.ts` | ||
| - [x] Verify fish completions work manually: `openspec completion install fish` | ||
|
|
||
| ## Phase 3: PowerShell Support | ||
|
|
||
| - [x] Create `src/core/completions/generators/powershell-generator.ts` implementing `CompletionGenerator` interface | ||
| - [x] Create `src/core/completions/installers/powershell-installer.ts` implementing `CompletionInstaller` interface | ||
| - [x] Update `CompletionFactory.createGenerator()` to support powershell | ||
| - [x] Update `CompletionFactory.createInstaller()` to support powershell | ||
| - [x] Create test file `test/core/completions/generators/powershell-generator.test.ts` | ||
| - [x] Create test file `test/core/completions/installers/powershell-installer.test.ts` | ||
| - [x] Verify PowerShell completions work manually on Windows or macOS PowerShell | ||
|
|
||
| ## Phase 4: Documentation and Testing | ||
|
|
||
| - [x] Update `CLAUDE.md` or relevant documentation to mention all four supported shells | ||
| - [x] Add cross-shell consistency test verifying all shells support same commands | ||
| - [x] Run `pnpm test` to ensure all tests pass | ||
| - [x] Run `pnpm run build` to verify TypeScript compilation | ||
| - [x] Test all shells on different platforms (Linux for bash/fish/zsh, Windows/macOS for PowerShell) | ||
|
|
||
| ## Phase 5: Validation and Cleanup | ||
|
|
||
| - [x] Run `openspec validate extend-shell-completions --strict` and resolve all issues | ||
| - [x] Update error messages to list all four supported shells | ||
| - [x] Verify `openspec completion --help` documentation is current | ||
| - [x] Test auto-detection works for all shells | ||
| - [x] Ensure uninstall works cleanly for all shells |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a bunch of
zshrcConfiguredchecks in this file, do we need to extend for other shells here too?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly I think there's a few places where we focus on
zshheavily. For example there's a restart hint for zsh but not for other shells.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think even when uninstalling we mention zshrc