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

zparseopts and longopts



Howdy hackers,

I'm seeing erratic behaviour when using zparseopts together with GNU
long options which have additional dashes and the first part before the
dash is common. Example:

---clip---
#!/bin/zsh
zparseopts -E -D -- -gnu:=gnu -gnu-tard:=gnutard
print -- $gnu\\n$gnutard
---clap---

Executing as intended:

% ./test.zsh --gnu argh --gnu-tard rms
--gnu argh
--gnu-tard rms

Executing with imaginary new option:

% ./test.zsh --gnu argh --gnu-tard rms --gnu-tard-added-even-longer-opt whyohwhy
--gnu argh
--gnu-tard -added-even-longer-opt

-- 
Atte Peltomäki
     atte.peltomaki@xxxxxx <> http://kameli.org
"Your effort to remain what you are is what limits you"



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