From 9d7a23615c1961fc8ef44bc0192ab51bc45fdcb5 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Mon, 30 Aug 2021 22:27:29 +0100 Subject: [PATCH] feat(dev): lazy-load scaleway CLI completions --- zsh/scaleway.zsh | 11 +++++++++++ zshrc | 1 + 2 files changed, 12 insertions(+) create mode 100644 zsh/scaleway.zsh diff --git a/zsh/scaleway.zsh b/zsh/scaleway.zsh new file mode 100644 index 0000000..de048b8 --- /dev/null +++ b/zsh/scaleway.zsh @@ -0,0 +1,11 @@ +# +# Scaleway CLI setup. +# + +if command-exists scw; then + _scw() { + unset -f _scw + eval "$(command scw autocomplete script shell=zsh)" + } + compctl -K _scw scw +fi diff --git a/zshrc b/zshrc index 8dbd0d4..89424ca 100644 --- a/zshrc +++ b/zshrc @@ -127,6 +127,7 @@ source "$DOTZSH/nodejs.zsh" source "$DOTZSH/python.zsh" source "$DOTZSH/ruby.zsh" source "$DOTZSH/rust.zsh" +source "$DOTZSH/scaleway.zsh" # ============================================================================== # Basic Z-Shell settings