about summary refs log tree commit diff
path: root/Completion/Core/_sep_parts
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-02-09 16:29:22 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-02-09 16:29:22 +0000
commit74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca (patch)
treea1fe3b909e93ec0b05a147e9cc8e0b7c7564af1c /Completion/Core/_sep_parts
parent06cd60e1cfea19da528c59453f9c15edae2de41e (diff)
downloadzsh-74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca.tar.gz
zsh-74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca.tar.xz
zsh-74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca.zip
zsh-workers/9635
Diffstat (limited to 'Completion/Core/_sep_parts')
-rw-r--r--Completion/Core/_sep_parts23
1 files changed, 10 insertions, 13 deletions
diff --git a/Completion/Core/_sep_parts b/Completion/Core/_sep_parts
index 4af470caa..cff34db0c 100644
--- a/Completion/Core/_sep_parts
+++ b/Completion/Core/_sep_parts
@@ -22,19 +22,16 @@ local matchflags opt group expl nm=$compstate[nmatches] opre osuf opts match
 
 # Get the options.
 
-group=()
-expl=()
-opts=()
-while getopts "J:V:X:P:F:S:r:R:qM:12n" opt; do
-  case "$opt" in
-  [JV])   group=("-$opt" "$OPTARG");;
-  X)      expl=(-X "$OPTARG");;
-  [q12n]) opts=( "$opts[@]" "-$opt" );;
-  M)      match="$OPTARG";;
-  *)      opts=( "$opts[@]" "-$opt" "$OPTARG" );;
-  esac
-done
-shift OPTIND-1
+zparseopts -D \
+    J:group V:group \
+    P:opts F:opts S:opts r:opts R:opts qopts 1opts 2opts nopts \
+    X:expl M:match
+
+if (( $#match )); then
+  match="${match[1][3,-1]}"
+else
+  match=''
+fi
 
 # Get the string from the line.