about summary refs log tree commit diff
path: root/Completion/Zsh/Context/_math
blob: f82f1c0fbf378e319a70fddc97204be772f6152a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#compdef -math- let

if [[ "$PREFIX" = *[^a-zA-Z0-9_]* ]]; then
  IPREFIX="$IPREFIX${PREFIX%%[a-zA-Z0-9_]#}"
  PREFIX="${PREFIX##*[^a-zA-Z0-9_]}"
fi
if [[ "$SUFFIX" = *[^a-zA-Z0-9_]* ]]; then
  ISUFFIX="${SUFFIX##[a-zA-Z0-9_]#}$ISUFFIX"
  SUFFIX="${SUFFIX%%[^a-zA-Z0-9_]*}"
fi

_alternative 'math-parameters:math parameter: _math_params' \
    'user-math-functions:user math function: _user_math_func' \
    'module-math-functions:math function from zsh/mathfunc: _module_math_func'