mongo-atlas.plugin.zsh
430 bytes
1# Autocompletion for the Mongo Atlas CLI (atlas).
2if (( ! $+commands[atlas] )); then
3 return
4fi
5
6# If the completion file doesn't exist yet, we need to autoload it and
7# bind it to `atlas`. Otherwise, compinit will have already done that.
8if [[ ! -f "$ZSH_CACHE_DIR/completions/_atlas" ]]; then
9 typeset -g -A _comps
10 autoload -Uz _atlas
11 _comps[atlas]=_atlas
12fi
13
14atlas completion zsh >| "$ZSH_CACHE_DIR/completions/atlas" &|