Reformat share/{completions,functions}

This commit is contained in:
Johannes Altmanninger 2025-01-15 10:41:12 +01:00
parent f139d8ebed
commit c12f853db2
10 changed files with 87 additions and 90 deletions

View File

@ -1,4 +1,3 @@
complete -c bru -s h -l help -d "Show help"
complete -c bru -l version -d "Show version number"

View File

@ -2,22 +2,22 @@
set -l subcmds prompt aliases chat collections embed embed-models embed-multi install keys logs models openai plugins similar templates uninstall
function __fish_llm_subcmds
printf "%s\t%s\n" "prompt" "Execute a prompt" \
"aliases" "Manage model aliases" \
"chat" "Hold chat with model" \
"collections" "View/manage embedding collections" \
"embed" "Embed text and get/store result" \
"embed-models" "Manage available embedding models" \
"embed-multi" "Store embeddings for multiple strings" \
"install" "Install PyPI packages into llm env" \
"keys" "Manage stored API keys" \
"logs" "Explore logged prompts/responses" \
"models" "Manage available models" \
"openai" "Work with OpenAI API directly" \
"plugins" "List installed plugins" \
"similar" "Return top-N similar IDs for collection" \
"templates" "Manage stored prompt templates" \
"uninstall" "Uninstall Python packages from llm env"
printf "%s\t%s\n" prompt "Execute a prompt" \
aliases "Manage model aliases" \
chat "Hold chat with model" \
collections "View/manage embedding collections" \
embed "Embed text and get/store result" \
embed-models "Manage available embedding models" \
embed-multi "Store embeddings for multiple strings" \
install "Install PyPI packages into llm env" \
keys "Manage stored API keys" \
logs "Explore logged prompts/responses" \
models "Manage available models" \
openai "Work with OpenAI API directly" \
plugins "List installed plugins" \
similar "Return top-N similar IDs for collection" \
templates "Manage stored prompt templates" \
uninstall "Uninstall Python packages from llm env"
end
complete -c llm -n __fish_is_first_token -xa "(__fish_llm_subcmds)"
@ -45,7 +45,7 @@ end
set -l condition "not __fish_seen_subcommand_from $subcmds || __fish_seen_subcommand_from prompt"
complete -c llm -n $condition -s s -l system -d "System prompt to use" -r
complete -c llm -n $condition -s m -l model -d "Model to use" -xa "(__fish_llm_models)"
complete -c llm -n $condition -s a -l attachment -d "Attachment to use" -ra'-'
complete -c llm -n $condition -s a -l attachment -d "Attachment to use" -ra-
complete -c llm -n $condition -l at -d "Attachment type" -r
complete -c llm -n $condition -l attachment-type -d "Attachment type" -r
complete -c llm -n $condition -s n -l no-log -d "Don't log to db" -x

View File

@ -2,7 +2,6 @@ function __fish_ollama_list
ollama list 2>/dev/null | tail -n +2 | string replace --regex "\s.*" ""
end
complete -f -c ollama
complete -c ollama -n __fish_use_subcommand -a serve -d "Start ollama"
complete -c ollama -n __fish_use_subcommand -a create -d "Create a model from a Modelfile"

View File

@ -11,4 +11,3 @@ else
# is better than trying to write to /etc unexpectedly.
rclone completion fish -
end 2>/dev/null | source

View File

@ -221,7 +221,7 @@ complete -c tmux -n "__fish_seen_subcommand_from $breakp $linkw $movew $neww $sw
complete -c tmux -n "__fish_seen_subcommand_from $killw $lastp $nextl $prevl $renamew" -xs t -d 'target window'
complete -c tmux -n "__fish_seen_subcommand_from $resizew $reswpawnw $rotatew $selectw $unlinkw" -xs t -d 'target window'
complete -c tmux -n "__fish_seen_subcommand_from $displayp" -xs t -d 'target client'
complete -c tmux -n "__fish_seen_subcommand_from $lsp" -xs t -d 'target'
complete -c tmux -n "__fish_seen_subcommand_from $lsp" -xs t -d target
############### End: Windows and Panes ###############