zsh-users
 help / color / mirror / code / Atom feed
From: Greg Klanderman <gak@klanderman.net>
To: zsh-users@zsh.org
Subject: Re: Can we have an additional output option for setopt?
Date: Thu, 19 Jan 2012 14:28:13 -0500	[thread overview]
Message-ID: <m3mx9j5w6q.fsf@klanderman.net> (raw)
In-Reply-To: <20120119100412.24fd288e@pwslap01u.europe.root.pri> (Peter Stephenson's message of "Thu, 19 Jan 2012 10:04:12 +0000")


>>>>> On January 19, 2012 Peter Stephenson <Peter.Stephenson@csr.com> 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


  reply	other threads:[~2012-01-19 19:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-18 20:20 Larry Schrof
2012-01-18 21:08 ` Mikael Magnusson
2012-01-19 10:04   ` Peter Stephenson
2012-01-19 19:28     ` Greg Klanderman [this message]
2012-01-19 17:41   ` Bart Schaefer
2012-01-19 18:37     ` Larry Schrof

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3mx9j5w6q.fsf@klanderman.net \
    --to=gak@klanderman.net \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).