zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: <zsh-workers@zsh.org>
Subject: Re: Another ${(z)param} buglet
Date: Mon, 13 Dec 2010 09:35:12 -0800	[thread overview]
Message-ID: <101213093514.ZM10971@torch.brasslantern.com> (raw)
In-Reply-To: <20101213094746.35712a38@pwslap01u.europe.root.pri>

On Dec 13,  9:47am, Peter Stephenson wrote:
}
} Bart Schaefer <schaefer@brasslantern.com> wrote:
} > What say?  This could also easily be tweaked to make (z) and (z:...:),
} > with the :...: having become optional

It occurred to me later that, because any character can be a delimiter,
it's not really possible to have it be optional in this way.  That is,
${(lq8qq-q)RANDOM} only works because "l" is always followed by a
delimiter.

} If you've got Z you don't necessarily need z+ as well. I was trying to
} avoid using up yet another letter, but once you do there's no great
} need to do anything with the original one.

OK ... that still doesn't answer the question of whether to in fact
use up that extra letter, which is probably related to the question
of whether one ever might want to use a different delimiter.

As it's already possible to write confusing-looking expansions like
that RANDOM example, how about this suggestion:

Let's go ahead and use up Z for this so as not to tangle up z with a
new more restricted delimiter syntax.  Further let's immediately
reserve a character (maybe "+") to have no meaning of its own, but
instead to always introduce a delimited string into which we can put 
new options.  E.g. (C) and (+(C)) could have distinct meanings.
That gets us back the entire alphabet for new things we want to
throw into (+:...:), and permits the possibility of nesting (which
I hope we'd never need) such as (+{+{...}}).

Currently (before z+ or the above proposal) we have these letters
left over (I'm intentionally excluding $ as that would engender
_way_ too much confusion):

    ^ = _ * + b g G J K T x y Y Z

In the "probably to be avoided" category are:

    < > | - , ; : ! ? / .  [ ] { } &

And we've used these:

    ~ @ # % 0 a A B c C d D e E f F i I j k l L m M
    n N o O p P q Q r R s S t u U v V w W X z

Thoughts?  I'd actually lean towards "_" rather than "+" as the
introducer for the delimted extension syntax, but there may be things
I'm not considering like limitations of non-English keyboards.

-- 


  reply	other threads:[~2010-12-13 17:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08  4:34 Bart Schaefer
2010-12-08 17:51 ` Peter Stephenson
2010-12-09 15:42   ` Bart Schaefer
2010-12-09 18:16     ` Peter Stephenson
2010-12-09 20:19       ` Peter Stephenson
2010-12-12 22:45         ` Peter Stephenson
2010-12-13  1:26           ` Bart Schaefer
2010-12-13  9:47             ` Peter Stephenson
2010-12-13 17:35               ` Bart Schaefer [this message]
2010-12-13 18:12                 ` Peter Stephenson
2010-12-14 10:20                   ` Peter Stephenson
2010-12-14 16:57                   ` Bart Schaefer
2010-12-13  5:16           ` Bart Schaefer
2010-12-13 10:15         ` Peter Stephenson
2010-12-09 20:25       ` Bart Schaefer

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=101213093514.ZM10971@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@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).