rename files
This commit is contained in:
parent
16d7cb2696
commit
3c096fec0f
|
@ -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 "$@"
|
||||
|
||||
*/
|
Loading…
Reference in New Issue