about summary refs log tree commit diff
path: root/Completion/Zsh
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:23:46 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2001-04-02 11:23:46 +0000
commit56925c24cf5fbf5e919c88b50070777415c7f667 (patch)
treee4688c3ceaed3ecf6949c93b51756a8df60eae14 /Completion/Zsh
parent6b88d1aaf24a42fc5ebfcd755bad92452a61e6ae (diff)
downloadzsh-56925c24cf5fbf5e919c88b50070777415c7f667.tar.gz
zsh-56925c24cf5fbf5e919c88b50070777415c7f667.tar.xz
zsh-56925c24cf5fbf5e919c88b50070777415c7f667.zip
moved from Completion/Base/_math
Diffstat (limited to 'Completion/Zsh')
-rw-r--r--Completion/Zsh/Context/_math12
1 files changed, 12 insertions, 0 deletions
diff --git a/Completion/Zsh/Context/_math b/Completion/Zsh/Context/_math
new file mode 100644
index 000000000..278189ebe
--- /dev/null
+++ b/Completion/Zsh/Context/_math
@@ -0,0 +1,12 @@
+#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
+
+_parameters -g '(integer|float)*' || _parameters