diff --git a/completions/fabric.bash b/completions/fabric.bash index 7a096d76..83feef04 100644 --- a/completions/fabric.bash +++ b/completions/fabric.bash @@ -10,7 +10,11 @@ _fabric() { local cur prev words cword - _get_comp_words_by_ref -n : cur prev words cword + if declare -F _comp_get_words &>/dev/null; then + _comp_get_words cur prev words cword + else + _get_comp_words_by_ref cur prev words cword + fi # Define all possible options/flags local opts="--pattern -p --variable -v --context -C --session --attachment -a --setup -S --temperature -t --topp -T --stream -s --presencepenalty -P --raw -r --frequencypenalty -F --listpatterns -l --listmodels -L --listcontexts -x --listsessions -X --updatepatterns -U --copy -c --model -m --vendor -V --modelContextLength --output -o --output-session --latest -n --changeDefaultModel -d --youtube -y --playlist --transcript --transcript-with-timestamps --comments --metadata --yt-dlp-args --language -g --scrape_url -u --scrape_question -q --seed -e --thinking --wipecontext -w --wipesession -W --printcontext --printsession --readability --input-has-vars --no-variable-replacement --dry-run --serve --serveOllama --address --api-key --config --search --search-location --image-file --image-size --image-quality --image-compression --image-background --suppress-think --think-start-tag --think-end-tag --disable-responses-api --transcribe-file --transcribe-model --split-media-file --voice --list-gemini-voices --notification --notification-command --debug --version --listextensions --addextension --rmextension --strategy --liststrategies --listvendors --shell-complete-list --help -h"