summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:18:06 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:18:06 +0000
commitb564a4944d7a0e497f31a4b6261e88c1111534ad (patch)
treee07ecf48650ea66d1ff22a464ac2f9d6aa0fd552 /Completion
parent2a7cbe584f5932d1d2d71fe25f16f5f290187fa3 (diff)
downloadzsh-b564a4944d7a0e497f31a4b6261e88c1111534ad.tar.gz
zsh-b564a4944d7a0e497f31a4b6261e88c1111534ad.tar.xz
zsh-b564a4944d7a0e497f31a4b6261e88c1111534ad.zip
moved from Completion/Builtins/_aliases
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Zsh/Type/_aliases17
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