Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zparseopts and longopts
- X-seq: zsh-users 21553
- From: Atte Peltomaki <atte.peltomaki@xxxxxx>
- To: zsh-users@xxxxxxx
- Subject: zparseopts and longopts
- Date: Thu, 12 May 2016 14:16:28 +0300
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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