From 7e4b330e98993f0b2b437fac92bed9c27375657d Mon Sep 17 00:00:00 2001 From: sealad886 Date: Mon, 27 Jan 2025 09:49:43 +0000 Subject: [PATCH] Took out the manpage parts. --- plugins/ollama/ollama.plugin.zsh | 40 -------------------------------- 1 file changed, 40 deletions(-) diff --git a/plugins/ollama/ollama.plugin.zsh b/plugins/ollama/ollama.plugin.zsh index 64ee87e0c..14412e32f 100644 --- a/plugins/ollama/ollama.plugin.zsh +++ b/plugins/ollama/ollama.plugin.zsh @@ -1,43 +1,3 @@ -install_ollama_manpage() { - local manpage_source="${0:A:h}/ollama.1" # Path to the manpage in the plugin directory - local manpage_target_dir - local manpage_target - - # Determine the appropriate man directory based on the operating system - case "$(uname)" in - Linux|Darwin) - manpage_target_dir="/usr/local/share/man/man1" - ;; - *) - echo "Unsupported OS: $(uname). Manpage installation skipped." - return - ;; - esac - - manpage_target="${manpage_target_dir}/ollama.1" - - # Check if the manpage already exists - if [[ -f "$manpage_target" ]]; then - # silently stop if the manpage entry already exists - return - fi - - # Manpage does not exist; proceed with installation - if [[ -f "$manpage_source" ]]; then - # Ensure the target directory exists - if [[ ! -d "$manpage_target_dir" ]]; then - sudo mkdir -p "$manpage_target_dir" - fi - # Copy the manpage to the target directory - sudo cp "$manpage_source" "$manpage_target" - else - echo "Manpage source file not found: $manpage_source" - fi -} - -# Call the function to install the manpage -install_ollama_manpage - # Function to retrieve available models for completion _ollama_get_models() { # Execute 'ollama list' and capture its output, suppressing any error messages