mongo-atlas.plugin.zsh 430 B

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