-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from hlship/hls/20250110-completions-25
Add support for zsh command completions
- Loading branch information
Showing
14 changed files
with
336 additions
and
63 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -18,15 +18,15 @@ jobs: | |
uses: actions/[email protected] | ||
|
||
- name: Setup Java | ||
uses: actions/setup-java@v4.5.0 | ||
uses: actions/setup-java@v4.6.0 | ||
with: | ||
java-version: '11' | ||
distribution: 'corretto' | ||
|
||
- name: Install clojure tools | ||
uses: DeLaGuardo/setup-clojure@13.0 | ||
uses: DeLaGuardo/setup-clojure@13.1 | ||
with: | ||
cli: 1.12.0.1488 | ||
cli: 1.12.0.1495 | ||
|
||
- name: Cache clojure dependencies | ||
uses: actions/cache@v4 | ||
|
This file contains 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 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 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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,21 @@ | ||
{{category.fn-name}}() { | ||
local state line | ||
_arguments -C \ | ||
"1: :->cmds" \ | ||
"*::arg:->args" | ||
case "$state" in | ||
cmds) | ||
_values "{{tool}} {{category.name}} subcommands" {% for sub in category.subs %} \ | ||
"{{sub.name}}[{{sub.summary}}]" {% endfor %} | ||
;; | ||
args) | ||
case $line[1] in {% for sub in category.subs %} | ||
{{sub.name}}) {{sub.fn-name}} ;; {% endfor %} | ||
esac | ||
;; | ||
esac | ||
} | ||
|
||
|
This file contains 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,5 @@ | ||
{{command.fn-name}}() { | ||
_arguments -s {% for opt in command.options %} \ | ||
{{ opt }} {% endfor %} | ||
} | ||
|
This file contains 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,22 @@ | ||
#compdef _{{tool}} {{tool}} | ||
|
||
_{{tool}}() { | ||
local line state | ||
_arguments -C \ | ||
"1: :->cmds" \ | ||
"*::arg:->args" | ||
case "$state" in | ||
cmds) | ||
_values "{{tool}} command" {% for cmd in commands %} \ | ||
"{{cmd.name}}[{{cmd.summary}}]" {% endfor %} | ||
;; | ||
args) | ||
case $line[1] in {% for cmd in commands %} | ||
{{cmd.name}}) {{cmd.fn-name}} ;; | ||
{% endfor %} | ||
esac | ||
;; | ||
esac | ||
} |
This file contains 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 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 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.