diff options
-rw-r--r-- | Completion/Zsh/Type/_aliases | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Completion/Zsh/Type/_aliases b/Completion/Zsh/Type/_aliases new file mode 100644 index 000000000..db8e31678 --- /dev/null +++ b/Completion/Zsh/Type/_aliases @@ -0,0 +1,17 @@ +#compdef alias unalias + +local expl sel args opts + +zparseopts -E -D s:=sel + +[[ -z $sel ]] && sel=rg + +opts=( "$@" ) + +args=() +[[ $sel = *r* ]] && args=( $args 'aliases:regular alias:compadd -k aliases' ) +[[ $sel = *g* ]] && args=( $args 'global-aliases:global alias:compadd -k galiases' ) +[[ $sel = *R* ]] && args=( $args 'disabled-aliases:disabled regular alias:compadd -k dis_aliases' ) +[[ $sel = *G* ]] && args=( $args 'disabled-global-aliases:disabled global alias:compadd -k dis_galiases' ) + +_alternative -O opts $args |