rename files

This commit is contained in:
Jeff Carr 2025-09-21 11:22:04 -05:00
parent 16d7cb2696
commit 3c096fec0f
2 changed files with 28 additions and 0 deletions

View File

@ -73,3 +73,31 @@ func makeBashCompletionText2(argname string) string {
out += fmt.Sprintf("# copy and paste the above into your bash shell should work\n")
return out
}
// zsh:
/*
#compdef forge
# Zsh completion function for the 'forge' command.
_forge_completions() {
local -a words
local -i CURRENT
# Zsh's equivalent of Bash's COMP_WORDS and COMP_CWORD
words=("${(@)words}")
CURRENT=$CURRENT
# Generate the completion suggestions by calling the forge command.
# The output is split into an array.
local -a suggestions
suggestions=("${(@f)$(forge --auto-complete "'${words[CURRENT]}'" "${words[@]}")}")
# Pass the suggestions to the Zsh completion system.
_describe 'completions' suggestions
}
# Register the function to be called for the 'forge' command.
_forge_completions "$@"
*/