mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
22 lines
508 B
Plaintext
22 lines
508 B
Plaintext
#compdef alias
|
|
|
|
local curcontext="$curcontext" state line suf
|
|
|
|
_arguments -C -s -A "-*" -S \
|
|
'-+g[list or define global aliases]' \
|
|
'-+r[list or define regular aliases]' \
|
|
'-+m[print aliases matching specified pattern]' \
|
|
'-L[print each alias in the form of calls to alias]' \
|
|
'*::alias definition:->defn'
|
|
|
|
if [[ -n "$state" ]]; then
|
|
if compset -P 1 '*='; then
|
|
compset -q
|
|
_normal
|
|
else
|
|
compset -S '=*' || suf='='
|
|
_wanted alias expl 'alias definition' _aliases -S "$suf"
|
|
fi
|
|
fi
|
|
|