From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3347 invoked by alias); 19 Jan 2012 19:36:45 -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: 16739 Received: (qmail 16338 invoked from network); 19 Jan 2012 19:36:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at klanderman.net does not designate permitted sender hosts) From: Greg Klanderman To: zsh-users@zsh.org Subject: Re: Can we have an additional output option for setopt? Reply-To: gak@klanderman.net Date: Thu, 19 Jan 2012 14:28:13 -0500 In-Reply-To: <20120119100412.24fd288e@pwslap01u.europe.root.pri> (Peter Stephenson's message of "Thu, 19 Jan 2012 10:04:12 +0000") Message-ID: User-Agent: Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.17 (linux) References: <20120119100412.24fd288e@pwslap01u.europe.root.pri> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii >>>>> On January 19, 2012 Peter Stephenson wrote: > showoptions() { > local k > zmodload -i zsh/parameter > > for k in ${(ok)options}; do > printf "%-20s\t%s\n" $k ${options[$k]} > done > } I have almost exactly that function, except I do for k in ${@:-${(ok)options}}; do so I can optionally specify a list of options on the command line, and set up completion appropriately. Greg