[PR #11832] feat(cmd): add support for auto-completions #39503

Open
opened 2026-04-23 00:21:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11832
Author: @pkarakal
Created: 8/9/2025
Status: 🔄 Open

Base: mainHead: add-autocompletion


📝 Commits (1)

  • 2311e5e feat(cmd): add support for auto-completions

📊 Changes

3 files changed (+353 additions, -29 deletions)

View changed files

📝 cmd/cmd.go (+54 -29)
cmd/completions.go (+235 -0)
📝 docs/linux.md (+64 -0)

📄 Description

This enables tab completions for bash, zsh, fish and powershell. It takes into consideration the number of arguments each command expects and also filters the models based on the command. It also filters out models if they have already been specified in the leading arguments. It also disables file completions on commands like pull and serve. Finally, it makes the completion suggestion work even if the binary name used isn't ollama. This should help us use it even while developing.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/11832 **Author:** [@pkarakal](https://github.com/pkarakal) **Created:** 8/9/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `add-autocompletion` --- ### 📝 Commits (1) - [`2311e5e`](https://github.com/ollama/ollama/commit/2311e5e2c9d979415ea20de45b5f49b3745149e3) feat(cmd): add support for auto-completions ### 📊 Changes **3 files changed** (+353 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+54 -29) ➕ `cmd/completions.go` (+235 -0) 📝 `docs/linux.md` (+64 -0) </details> ### 📄 Description This enables tab completions for bash, zsh, fish and powershell. It takes into consideration the number of arguments each command expects and also filters the models based on the command. It also filters out models if they have already been specified in the leading arguments. It also disables file completions on commands like pull and serve. Finally, it makes the completion suggestion work even if the binary name used isn't `ollama`. This should help us use it even while developing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 00:21:44 -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#39503