Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to return an error when an option is not seen with zparseopts?
- X-seq: zsh-users 23775
- From: Peng Yu <pengyu.ut@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: How to return an error when an option is not seen with zparseopts?
- Date: Sun, 2 Dec 2018 14:33:47 -0600
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=bLxd9lvaIUaq4EUr6nV2kyycJRPg7ToDt7BUXcIUryo=; b=QfjKTb0koyvDvuPkdoyFcsOpkGzSi5AeF91ecziTGhBaGlrxLPM2YolAIegHvgFl+k bdlRMFFhmBAlnRhoIBGU2rBXjTYc1ATrpIbs/RJ3sge11kLdhQzttgwHboWIWbVTrw5r r6aO0drEIKAZSBEe5T7Lq0tg1GAFpddMu2JjiBUAJNtQSkTxw04sz1PEAxwVjH7rVoM8 FwyuRG3MfdN5rDpbPhzC1jyEBmu3TBQG1ou1rT+mqsDggwUszDQZ442LX5hFfPKwLU20 xq1O7gWvq37U71w1EBReBAumoAqBhJkmBofjyfQyUGhvnbZhjZ81lpbZbocFrTMrg20Q XwGA==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
Hi,
Since -b is not an option specified, I'd like to have zparseopts fail.
But I don't see which option can do so. Could anybody show me? Thanks.
a_opt=(-a 'b')
set -- -b x - a b c
zparseopts -K a:=a_opt
declare -p a_opt
declare -p argv
--
Regards,
Peng
Messages sorted by:
Reverse Date,
Date,
Thread,
Author