[PR #11537] cmd: add shell completion support #13576

Closed
opened 2026-04-13 00:30:29 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/11537

State: closed
Merged: No


Enable tab completion for bash, zsh, fish, and PowerShell with context-aware model suggestions. Commands like 'stop' show only running models while 'run', 'show', 'rm' suggest available models.

Resolves #925

Allows for quality of life improvements like running:

$ ollama <TAB>
 -- completions --
completion  -- Generate the autocompletion script for the specified shell
cp          -- Copy a model
create      -- Create a model
help        -- Help about any command
list        -- List models
ps          -- List running models
pull        -- Pull a model from a registry
push        -- Push a model to a registry
rm          -- Remove a model
run         -- Run a model
serve       -- Start ollama
show        -- Show information for a model
stop        -- Stop a running model

and

$ ollama rm <TAB>
 -- completions --
deepseek-r1:latest       gemma3:4b                llama3.2:latest          nomic-embed-text:latest
gemma3:1b                gemma3:latest            mistral-small:latest
**Original Pull Request:** https://github.com/ollama/ollama/pull/11537 **State:** closed **Merged:** No --- Enable tab completion for bash, zsh, fish, and PowerShell with context-aware model suggestions. Commands like 'stop' show only running models while 'run', 'show', 'rm' suggest available models. Resolves #925 Allows for quality of life improvements like running: ``` $ ollama <TAB> -- completions -- completion -- Generate the autocompletion script for the specified shell cp -- Copy a model create -- Create a model help -- Help about any command list -- List models ps -- List running models pull -- Pull a model from a registry push -- Push a model to a registry rm -- Remove a model run -- Run a model serve -- Start ollama show -- Show information for a model stop -- Stop a running model ``` and ``` $ ollama rm <TAB> -- completions -- deepseek-r1:latest gemma3:4b llama3.2:latest nomic-embed-text:latest gemma3:1b gemma3:latest mistral-small:latest ```
GiteaMirror added the pull-request label 2026-04-13 00:30:29 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13576