mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-20 14:04:03 +01:00
18 lines
521 B
Plaintext
18 lines
521 B
Plaintext
#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
|