From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13513 invoked by alias); 26 Jan 2016 09:21:11 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37790 Received: (qmail 13076 invoked from network); 26 Jan 2016 09:21:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=o2NBlP36sjuXiQiVhydmsg8hKXNNtXPZD9GUrnqt1fA=; b=msfBB1OUVVWhWG0fPKGgcfLGQ4cf5JgiJmo+fMbZLl4GTFQWVYVX2poT4frZBmqqsJ OsJsh/nZ3/e4tRV7E5ZUxb+hTxTV9pnx4ETdZGJDrz8JEPo4wKSTSeuVEUVMTaGYGaFQ jQa7lkdzKshG3rBvhKf3/OKmYNOKthdsGUBQqtv7BMHKaEWY6IFERVRC99AbDfzZJSFK oDKZx7+d5L7U7cC4ogLNZrPVSS65ZRHtSx+8eISkircPJ2HAMdI0kl5V7aTFQRpdIOz/ cV8PTjMfmyWRDmlo7Un9+TQY6t4ndJUkpDRCvBdnIKZZ2t6zaKJzEwmgYoT7ixyslJL1 yUjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to :content-type; bh=o2NBlP36sjuXiQiVhydmsg8hKXNNtXPZD9GUrnqt1fA=; b=TcilpjE8gTysoTDZaO9wscl+9cHqEKkz3TDJo37w+XJ3mDpSisXEnqeTeWzBol6KMb pIqZfP0DkEhFR+IUj6hoT38hk55P9FEg1nV8RDbIihV3b1IAwdUQ6/xjuEZ3UEgulEV2 xDRa6mfp2cymBjqtRlqI8TLCU4oNeOWSUHsS419Uhwh8I84wfPNrfo2N/ov8NLvHBN+9 04RbuLJHTFZK2dLV1ntj1BW/ipNDF1s8hqjQBCLT+ZzAxsTxAWEJj/SqVuj6lOTNl5Nm b9rCk8rIk3WcJqFQ5kLmqD8lqs/rwlnpGkrPMxYeK+5RF6Oiurw8JlnbM/EQFEm+6ehR 97wA== X-Gm-Message-State: AG10YORBc22GBUu0JaJgsrRMtZxHWJfOVZ4t3YJpDYvcdAQ4lqBi0iN66MWnDMOU/lvsylhlfwisHcUsRP6jAA== X-Received: by 10.25.41.193 with SMTP id p184mr8298678lfp.150.1453800068946; Tue, 26 Jan 2016 01:21:08 -0800 (PST) MIME-Version: 1.0 From: Sebastian Gniazdowski Date: Tue, 26 Jan 2016 10:20:49 +0100 Message-ID: Subject: Advanced option parsing across zsh commands To: Zsh hackers list Content-Type: text/plain; charset=UTF-8 Hello, This will bind to current keymap, not to "a": % bindkey -N a main % bindkey -s '^[t' 'echo test' -M a I like zparseopts because of -E option, which allows to mix options with strings and handles --. Is it expected that one day zsh will do the same? It's a matter of providing one well written options parsing function, isn't it. That said, following zparseopts apparently fails: % set -- a -b something -- -c % typeset -A opts % zparseopts -A opts -DE b: c % echo "${(kv)opts}" % # $1, $2, ... $5 are still the same I once (12 years ago) used zparseopts this way and it worked great. The call had to be different then. Best regards, Sebastian Gniazdowski