comfy-cli
comfy-cli copied to clipboard
Issue w/ autocomplete on zsh
Describe the bug
When I run comfy --install-completion or comfy --install-completion zsh, the command inject the following into the zshrc and ~/.zfunc/
autoload -Uz compinit
zstyle ':completion:*' menu select
fpath+=~/.zfunc
~/.zfunc/_comfy
#compdef comfy
_comfy_completion() {
eval $(env _TYPER_COMPLETE_ARGS="${words[1,$CURRENT]}" _COMFY_COMPLETE=complete_zsh comfy)
}
compdef _comfy_completion comfy
However, it doesn't actually autocomplete even after restarting the terminal
Expected behavior Autocomplete
Nice to have
- [x] Screenshots
TAB
Interestingly, if I run . ~/.zshrc it works
Or if I do the following in zshrc, it also works:
autoload -Uz compinit
# Define custom completion for comfy
# Ensure that _comfy_completion is defined after compinit
_comfy_completion() {
eval $(env _TYPER_COMPLETE_ARGS="${words[1,$CURRENT]}" _COMFY_COMPLETE=complete_zsh comfy)
}
# Bind the completion function to the comfy command
compdef _comfy_completion comfy
# Other configurations (e.g., aliases, prompt, etc.)
zstyle ':completion:*' menu select