diff --git a/asdf.sh b/asdf.sh index 429f82ca..08825443 100644 --- a/asdf.sh +++ b/asdf.sh @@ -8,3 +8,9 @@ fi asdf_dir=$(cd $(dirname $current_script_path); echo $(pwd)) export PATH="${asdf_dir}/bin:${asdf_dir}/shims:$PATH" + +if [ -n "$ZSH_VERSION" ]; then + fpath=(${asdf_dir}/completions $fpath) + autoload -U compinit + compinit +fi diff --git a/completions/_asdf b/completions/_asdf new file mode 100644 index 00000000..0a2a48e2 --- /dev/null +++ b/completions/_asdf @@ -0,0 +1,3 @@ +#compdef asdf + +_arguments "1: :(plugin-add plugin-list plugin-remove plugin-update install uninstall which where list list-all reshim)"