You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
289.2 Contribute completions to zsh-completions library
289.3 Bash autocompletions
289.4 Fish autocompletions
This is not greatly useful for pet users yet, but in doing this I'll gather up some more knowledge about autocompletion and will then be able to judge whether or not it's possible to build autocompletions that rely on dynamic output from pet.
Couldn't tell from basic research, and this is a nice to have anyways.
The text was updated successfully, but these errors were encountered:
Still need to look into this, but I have something working.
ZSH autocompletion template:
# Define completion function for the 'pet' command
_pet_complete() {
local -a pet_commands=("new" "edit" "search" "exec")
_arguments -C \
'1: :->command' \
'*::arg:->args'
case $state in
(command)
# Complete the command based on the list of commands
_describe 'command' pet_commands
;;
(args)
# Do nothing for now, you can add additional completions for command arguments here
;;
esac
}
# Register completion function
_zstyle ':completion:*:pet:*' completer _pet_complete
# Call the completion function
_pet_complete "$@"```
This is not greatly useful for pet users yet, but in doing this I'll gather up some more knowledge about autocompletion and will then be able to judge whether or not it's possible to build autocompletions that rely on dynamic output from pet.
Couldn't tell from basic research, and this is a nice to have anyways.
The text was updated successfully, but these errors were encountered: