Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Idea for improvement of config_query_multi

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Ismael Luceno <ismael.luceno AT gmail.com>
  • To: sm-discuss AT lists.ibiblio.org
  • Subject: Re: [SM-Discuss] Idea for improvement of config_query_multi
  • Date: Wed, 23 Jun 2010 05:45:48 -0300

El Thu, 3 Jun 2010 09:47:30 +0200
Jaka Kranjc <smgl AT lynxlynx.info> escribió:
> On Thursday 03 of June 2010 02:10:37 flux wrote:
> > I had an idea about a way to add optional comment "fields" to
> > config_query_multi choice selection. I'll reference an end-user
> > example first.
> >
> > Current implementation:
> > Which mmworp would you like?
> > [0] secret
> > [1] foo
> > [2] bar
> > [3] blarg
> > You can select multiple choices by simply entering the proper
> > numbers and/or chars.
> > Select your choices? [ 0]
> >
> > Idea of new implementation:
> > Which mmworp would you like?
> > [0] secret (something you're not supposed to know)
> > [1] foo (the standard)
> > [2] bar (hmmm.... interesting...)
> > [3] blarg (NOT WANT)
> > You can select multiple choices by simply entering the proper
> > numbers and/or chars.
> > Select your choices? [ 0]
> >
> > The ability to put arbitrary text after a choice will greatly
> > enable a user to know what they are choosing without having to
> > expend too much effort in looking it up (at least if they still
> > need to look it up, they'll have a better idea of where to look).
> >
> > I grepped over the grimoire (only the main grimoire) and found no
> > instances of anything other than bare words for the choices. If an
> > array item is properly quoted, it can contain spaces (and of course
> > other characters), so I thought that encoding the new way as
> > follows might work well for us:
> >
> > config_query_multi WACKY_OPTIONS "Which mworp would you like?" \
> > "secret (something you're not supposed to know)"
> > "foo (the standard)"
> > "bar (hmm.... interesting...)"
> > "blarg (NOT WANT)"
> I suggest a more optional_depends like approach, to avoid extra
> parsing: config_query_multi WACKY_OPTIONS "Which mworp would you
> like?" \ secret "something you're not supposed to know" \
> obvious "" \
> bar "hmm.... interesting..." \
> blarg "NOT WANT"
>

I vote for space separators. $(cut -f1 -d' ') FTW!

Attachment: signature.asc
Description: PGP signature




Archive powered by MHonArc 2.6.24.

Top of Page