From 723e5a8417f51d0c1f80a510924f26cce511777a Mon Sep 17 00:00:00 2001 From: Next Alone <12210746+NextAlone@users.noreply.github.com> Date: Fri, 15 Nov 2024 23:42:51 +0800 Subject: [PATCH] completions(ollama): ollama need no files as i know (#10851) Closes #10851. Signed-off-by: Next Alone <12210746+NextAlone@users.noreply.github.com> --- share/completions/ollama.fish | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/share/completions/ollama.fish b/share/completions/ollama.fish index 3e3c03ce8..0d9c4fdb4 100644 --- a/share/completions/ollama.fish +++ b/share/completions/ollama.fish @@ -2,16 +2,18 @@ function __fish_ollama_list ollama list 2>/dev/null | tail -n +2 | string replace --regex "\s.*" "" end -complete -c ollama -a serve -d "Start ollama" -complete -c ollama -a create -d "Create a model from a Modelfile" -complete -c ollama -a show -d "Show information for a model" -complete -c ollama -a run -d "Run a model" -complete -c ollama -a pull -d "Pull a model from a registry" -complete -c ollama -a push -d "Push a model to a registry" -complete -c ollama -a list -d "List models" -complete -c ollama -a cp -d "Copy a model" -complete -c ollama -a rm -d "Remove a model" -complete -c ollama -a help -d "Help about any command" + +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" +complete -c ollama -n __fish_use_subcommand -a show -d "Show information for a model" +complete -c ollama -n __fish_use_subcommand -a run -d "Run a model" +complete -c ollama -n __fish_use_subcommand -a pull -d "Pull a model from a registry" +complete -c ollama -n __fish_use_subcommand -a push -d "Push a model to a registry" +complete -c ollama -n __fish_use_subcommand -a list -d "List models" +complete -c ollama -n __fish_use_subcommand -a cp -d "Copy a model" +complete -c ollama -n __fish_use_subcommand -a rm -d "Remove a model" +complete -c ollama -n __fish_use_subcommand -a help -d "Help about any command" complete -c ollama -s h -l help -d "help for ollama" complete -c ollama -s v -l version -d "Show version information" complete -c ollama -f -a "(__fish_ollama_list)" --condition '__fish_seen_subcommand_from show'