From: Oliver Kiddle <opk@u.genie.co.uk>
To: Zsh hackers list <zsh-workers@sunsite.dk>
Subject: Re: Enhanced shell
Date: Tue, 24 Jul 2001 14:42:41 +0100 [thread overview]
Message-ID: <3B5D7B51.35772566@u.genie.co.uk> (raw)
In-Reply-To: <1010723180327.ZM14158@candle.brasslantern.com>
Bart Schaefer wrote:
| On Jul 23, 12:13pm, Oliver Kiddle wrote:
| }
| } > precmd, chpwd, periodic
|
| I think these should always have been arrays of function names to be
| called, rather than magic function names in their own right. Of course,
| we could do both.
Still, I think we should mention them with the point about the
problems. It could possibly also apply with the ERR trap.
| } > ${+foo}
| } yes and some other parameter expansion extensions
|
| I think where we'll run into problems here, aside from the fact that the
| flags syntax used by zsh is a bit baroque, is with field splitting and
| whether various extensions apply before or after it happens (I have the
| impression that under traditional splitting rules, certain extensions
| can't possibly be made to apply after splitting). I see you've suggested
| leaving out expansion flags, though.
That is roughly why I suggested leaving out expansion flags. I was
thinking of some of the simpler things like ${name/pattern/repl} and
${name:#pattern}.
| } backreferences (ksh93's possibly being better)
|
| You didn't mention anything about that in workers/15348. What are the
| differences?
Well, they are very different really. Basically instead of accessing
matched parts of the pattern later with variables, you can refer back
to earler parts of a pattern so, for example, [[ abba = @(?)bb\1 ]]
would return true because \1 will match whatever the first thing in
brackets matched.
workers/15348 was never going to be complete. I've found other things
since like [=c=] in a pattern matches "all characters with the same
primary collation weight as the character c".
| } directory stack, and access with ~num
|
| You suggest having the directory stack as a special built-in but not the
| commands to manipulate it?
Well not really though with autopushd, that is how I use the directory
stack. The directory stack as a whole should probably be left out.
| } prompt percent substitutions
| Maybe.
I hadn't realised that bash used backslashes for this as Peter pointed
out so that'll probably be a problem
| } the common -L option to many builtins [similar to typeset -p in ksh]
|
| Option letter clashes are another place where we may have trouble. I
| think `-L' was a better choice than `-p', but ...
It doesn't help that -L is already used by typeset for left alignment.
| } array subscripts with start and end
|
| More 0-vs-1 problems.
Yes, that's going to be a fairly big problem. We probably have to put
up with the standard following ksh and zsh using the ksharrays option.
| What about subscript flags and pattern subscripts? array[(r)pat]
| "Reverse indexing"?
possibly.
| On Jul 23, 12:38pm, Peter Stephenson wrote:
| }
| } > typeset builtin (yes, it isn't in POSIX). Also, note that bash has
| } > obsoleted `typeset' in favour of `declare' which I think is better.
| }
| } It strikes me as a bit late for that now.
|
| But it could be added as another alias for typeset; ksh93 doesn't have
| `local' either (does it?).
It is already there as another alias for typeset!
ksh93 doesn't have `local'.
| } > > ? disable/enable? [bash]
| } > not so useful. they are also common as commands to enable/disable
| } > printers (on AIX and Solaris at least).
| }
| } Yes, I can see it would be silly defining a standard which is known to have
| } this clash in it.
|
| As has been pointed out, though, the functionality is useful. Rather
Another possibility would be if the functionality was achieved by
modifying special arrays like those in the zsh/parameter module or
ksh93's .sh namespace. Anyway, I suggest we mention the functionality
in our list for David Korn and point out the issues when it comes up in
discussion with him.
| } > > ? typeset etc. -g?
| } > zsh/bash dynamically scoped local variables.
| } Hmm. I don't know how this will pan out if ksh is going the way of
| } statically scoped parameters.
| Another typeset option?
Yes, as I think I mentioned in workers/15348, it is going to have to be
either no local variables or support both types (which is what Perl
does).
Oliver
_____________________________________________________________________
This message has been checked for all known viruses by the
MessageLabs Virus Scanning Service. For further information visit
http://www.messagelabs.com/stats.asp
next prev parent reply other threads:[~2001-07-24 13:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-22 22:47 Peter Stephenson
2001-07-23 11:13 ` Oliver Kiddle
2001-07-23 11:38 ` Peter Stephenson
2001-07-23 18:03 ` Bart Schaefer
2001-07-24 13:42 ` Oliver Kiddle [this message]
2001-07-23 12:00 ` Nadav Har'El
2001-07-23 16:38 ` Enable/disable (was Re: Enhanced shell) Bart Schaefer
2001-07-23 22:00 ` Nadav Har'El
2001-07-24 1:12 ` Bart Schaefer
2001-07-24 2:45 ` Here-strings and $functions Bart Schaefer
2001-07-24 6:18 ` Bart Schaefer
2001-07-24 8:12 ` Sven Wischnowsky
2001-07-24 12:16 ` Bart Schaefer
2001-07-24 9:23 ` Enable/disable (was Re: Enhanced shell) Peter Stephenson
2001-07-24 12:10 ` PATCH: Doc errors (Re: Enable/disable (was Re: Enhanced shell)) Bart Schaefer
2001-07-29 9:53 ` Enhanced shell Zefram
2001-07-29 22:07 ` Peter Stephenson
2001-07-30 1:34 ` Bart Schaefer
2001-07-30 2:19 ` 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=3B5D7B51.35772566@u.genie.co.uk \
--to=opk@u.genie.co.uk \
--cc=zsh-workers@sunsite.dk \
/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).