mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-05 11:01:13 +02:00
43818: complete math functions for other modules besides zsh/mathfunc
This commit is contained in:
parent
d5fec6b512
commit
082f703ccd
2 changed files with 11 additions and 5 deletions
|
@ -1,5 +1,8 @@
|
||||||
2018-11-12 Oliver Kiddle <okiddle@yahoo.co.uk>
|
2018-11-12 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||||
|
|
||||||
|
* 43818: Completion/Zsh/Type/_module_math_func: complete math
|
||||||
|
functions for other modules besides zsh/mathfunc
|
||||||
|
|
||||||
* 43816: Completion/Linux/Command/_valgrind,
|
* 43816: Completion/Linux/Command/_valgrind,
|
||||||
Completion/BSD/Command/_vmctl, Completion/Linux/Command/_ethtool,
|
Completion/BSD/Command/_vmctl, Completion/Linux/Command/_ethtool,
|
||||||
Completion/Linux/Command/_losetup, Completion/Linux/Command/_lsblk,
|
Completion/Linux/Command/_losetup, Completion/Linux/Command/_lsblk,
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#autoload
|
#autoload
|
||||||
|
|
||||||
local expl
|
local mod
|
||||||
local -a funcs
|
local -a funcs alts
|
||||||
|
local -a modules=( example mathfunc system )
|
||||||
|
|
||||||
funcs=(${${${(f)"$(zmodload -Fl zsh/mathfunc 2>/dev/null)"}:#^+f:*}##+f:})
|
for mod in $modules; do
|
||||||
|
funcs=( ${${${(f)"$(zmodload -Fl zsh/$mod 2>/dev/null)"}:#^+f:*}##+f:} )
|
||||||
|
alts+=( "module-math-functions.${mod}:math function from zsh/${mod}:compadd -S '(' $funcs" )
|
||||||
|
done
|
||||||
|
|
||||||
_wanted module-math-functions expl 'math function from zsh/mathfunc' \
|
_alternative $alts
|
||||||
compadd -S '(' -q "$@" -a funcs
|
|
||||||
|
|
Loading…
Reference in a new issue