source: https://www.perplexity.ai/search/did-people-make-for-ollama-bas-3RErncU0QcqHwaS64ukerw
You can implement bash autocompletion for Ollama model names by creating a custom bash completion script. Based on the search results, there's already a well-developed solution available that provides exactly this functionality.
- Create a new file for the Ollama completion script:
sudo nano /etc/bash_completion.d/ollama
Or create it in your home directory:
nano ~/.ollama-completion.sh
-
Copy the completion script from the GitHub issue[1] into this file (script details below).
-
If you placed it in your home directory, add this line to your
.bashrc
file:
source ~/.ollama-completion.sh
- Install required dependencies:
sudo apt install jq curl
- Restart your terminal or source your bashrc file:
source ~/.bashrc
Trying to merge into Ollama mainstream repo: ollama/ollama#9585