From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16847 invoked by alias); 12 May 2016 11:22:46 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21553 Received: (qmail 4710 invoked from network); 12 May 2016 11:22:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.1 X-Virus-Scanned: Debian amavisd-new at pp.htv.fi Date: Thu, 12 May 2016 14:16:28 +0300 From: Atte Peltomaki To: zsh-users@zsh.org Subject: zparseopts and longopts Message-ID: <20160512111628.GG12777@ass.pp.htv.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.5.23 (2014-03-12) 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@iki.fi <> http://kameli.org "Your effort to remain what you are is what limits you"