Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh-4.2.1: Bug in zparseopts ?



Hi,

script

#! /bin/zsh

emulate -L zsh

set -- -c 1
echo "New set:" $@
zparseopts -a args -A Args 'c:'
echo "c:" ${args[@]} "|" ${(kv)Args[@]}

echo "***********"
set -- --c 2
echo "New set:" $@

zparseopts -E -a args -A Args '--c+:'
echo "--c:" ${args[@]} "|" ${(kv)Args[@]}

zparseopts -E -a args -A args '\-c+:'
echo "\-c:" ${args[@]} "|" ${(kv)Args[@]}

zparseopts -E -a args -A args '-c+:'
echo "\-c:" ${args[@]} "|" ${(kv)Args[@]}


gives the following output:


New set: -c 1
c: -c 1 | -c 1
***********
New set: --c 2
--c: |
\-c: |
./t5.sh:zparseopts:20: missing option descriptions
\-c: |




"The Z Shell manual" p. 213 states that name='-files' should recognise GNU long options like "--files". However, I could not parse these options whith zparseopts.



Kind Regards,

Dieter Lambrecht




--

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.




Messages sorted by: Reverse Date, Date, Thread, Author