Skip to content

msbatarce/ollama_completion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

Ollama bash completions

Installation

Just copy the file and source it in your .bashrc or .zshrc.

mkdir -p ~/.bash_completions.d
wget -q -O - github.com/msbatarce/ollama_completion/raw/master/ollama_completion.bash >> ~/.bash_completions.d/ollama
echo ". ~/.bash_completions.d/ollama" >> ~/.bashrc

Description

The script includes completions for ollama pull by querying ollama.com using curl and a cache at "${TMPDIR:-/tmp}/ollama_completion"

The behavior of this script can be customized by the use of the following environment variables:

QUERY_OLLAMA_LIB_ENABLED

  • Controls whether to complete against ollama pull and fetch models and tags information.
    Set to 0 to disable.
    Default: 1 (enabled)

OLLAMA_COMPLETION_GUM_CHOOSE_ENABLED

  • Use gum to choose from the available completions options interactively.
    Set to 0 to disable.
    Default: 1 (enabled)

OLLAMA_COMPLETION_CACHE_TTL_MINUTES

  • Time To Live in minutes for the models and tags cache files invalidation.
    Default: 10

About

ollama bash completions

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages