From d94d2bf8d12d559020cd5e4be73149f164043929 Mon Sep 17 00:00:00 2001 From: sealad886 Date: Mon, 27 Jan 2025 13:08:12 +0000 Subject: [PATCH] alias stuff removed --- plugins/ollama/README.md | 6 ------ plugins/ollama/ollama.plugin.zsh | 9 ++++----- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/plugins/ollama/README.md b/plugins/ollama/README.md index 8a30c622a..f26f38cf9 100644 --- a/plugins/ollama/README.md +++ b/plugins/ollama/README.md @@ -60,12 +60,6 @@ The plugin provides autocompletion and enhanced functionality for the following | `rm` | Remove a model from the local system. | | `help [command]` | Provide help information for a command. | -### Alias - -The plugin includes an alias for convenience: - -- `o`: This is an alias for the `ollama` command, allowing you to use `o` as a shorthand for executing Ollama commands. Useful when jumping around the command line frequently. - ```sh >>> o ls NAME ID SIZE MODIFIED diff --git a/plugins/ollama/ollama.plugin.zsh b/plugins/ollama/ollama.plugin.zsh index 14412e32f..b288bbc18 100644 --- a/plugins/ollama/ollama.plugin.zsh +++ b/plugins/ollama/ollama.plugin.zsh @@ -68,8 +68,10 @@ _ollama() { # Handle argument completion based on the specified command case $words[1] in run|rm|stop|show|pull|push) - # For these commands, provide model name suggestions - _ollama_get_models + # For these commands, provide model name suggestions exactly once + if [[ $CURRENT -eq 2 ]]; then + _ollama_get_models + fi ;; cp) if [[ $CURRENT -eq 2 ]]; then @@ -101,6 +103,3 @@ _ollama() { # Register the '_ollama' function as the completion handler for the 'ollama' command compdef _ollama ollama - -# Register aliases -alias o=ollama