diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-09 16:29:22 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 2000-02-09 16:29:22 +0000 |
commit | 74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca (patch) | |
tree | a1fe3b909e93ec0b05a147e9cc8e0b7c7564af1c /Completion/Core/_multi_parts | |
parent | 06cd60e1cfea19da528c59453f9c15edae2de41e (diff) | |
download | zsh-74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca.tar.gz zsh-74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca.tar.xz zsh-74ccd8d5a3d9e6f7e14d57f73d58d1319b99e9ca.zip |
zsh-workers/9635
Diffstat (limited to 'Completion/Core/_multi_parts')
-rw-r--r-- | Completion/Core/_multi_parts | 28 |
1 files changed, 12 insertions, 16 deletions
diff --git a/Completion/Core/_multi_parts b/Completion/Core/_multi_parts index e64e2906f..61bd3acaf 100644 --- a/Completion/Core/_multi_parts +++ b/Completion/Core/_multi_parts @@ -13,22 +13,18 @@ typeset -U tmp2 # Get the options. -group=() -expl=() -opts=() -sopts=() -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");; - [PF]) opts=( "$opts[@]" "-$opt" "$OPTARG") - sopts=( "$sopts[@]" "-$opt" "$OPTARG");; - [SrR]) sopts=( "$sopts[@]" -P "$OPTARG");; - [q12n]) sopts=( "$sopts[@]" "-$opt");; - M) match="$OPTARG";; - esac -done -shift OPTIND-1 +zparseopts -D \ + J:group V:group X:expl \ + P:opts F:opts \ + S:sopts r:sopts R:sopts qsopts 1sopts 2sopts nsopts \ + M:match + +sopts=( "$sopts[@]" "$opts[@]" ) +if (( $#match )); then + match="${match[1][3,-1]}" +else + match='' +fi # Get the arguments, first the separator, then the array. The array is # stored in `matches'. Further on this array will always contain those |