-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Zsh shell autocompletions #43970
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
Closed
Closed
Zsh shell autocompletions #43970
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f846256
Add zsh completion template resource
adhocore 2458f63
Add zsh completion writer (options with description)
adhocore 3d38c39
Add a way to make completion input aware of shell
adhocore 166851a
Register zsh completion output writer, set shell on completion input
adhocore fc7f870
For zsh shell, add command description as well
adhocore 310a7c8
Fix existing tests for zsh
adhocore 0f649dc
Add test for zsh shell completions
adhocore 027ce97
Test completion input shell
adhocore f6a960b
Fix style
adhocore e209577
Remove unused return
adhocore 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
Fix style
- Loading branch information
commit f6a960b1034a5e70e78962a73d6bca8b558a2a54
There are no files selected for viewing
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
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.
Uh oh!
There was an error while loading. Please reload this page.
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.
Testing if shell is zsh seems very specific for this place.
We could use a DTO. The
ZshCompletionOutput
would format the value with its specificities. By implementing the__toString
method, theBashCompletionOutput
would not require any change.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.
or maybe some abstraction to tell/handle if the shell supports description for autocompleted suggestion
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.
That would add complexity in all commands that implements completion. I'm not sure this is something we want.
Each command should set suggestions values, optionally with a description using this DTO.