zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@sunsite.dk
Subject: Re: PATCH: printf builtin
Date: Fri, 21 Sep 2001 11:58:29 +0100	[thread overview]
Message-ID: <3BAB1D55.8258B237@yahoo.co.uk> (raw)
In-Reply-To: <1010920203312.ZM16858@candle.brasslantern.com>

Bart Schaefer wrote:
> 
> On Sep 20,  8:10pm, Oliver Kiddle wrote:
> }
> } Ksh and bash both have a printf builtin. This adds one to zsh.
> 
> Did you also notice that "print -f" in ksh is the same as printf?

Oh dear. I didn't notice that. print was one of the things which David
Korn was keen to have in the standard and without the -f, ksh's print
would be little more than echo. It's also quite a nice feature.

> This raises the question of whether it should be possible to combine
> print -f with all the other print options, which would imply quite a
> different implementation from what's in this patch, and would likely
> preclude it from being a module.

ksh allows -s, -p and -u to be combined with print -f. What you say
about this precluding it from being a module is certainly true. What I
think I'll do is commit this as it is for now. I also think this could
be safely committed to the stable branch so unless anyone says otherwise
I'll do that. My argument for this being that it doesn't touch any
existing functionality and just does something where we didn't do
anything useful before - so it is similar to us allowing new completion
functions to be added to 4.0.

I'll put the ksh print -f functionality on my todo list though. It makes
sense to combine the -b, -m, -s, -o, -O, -i, -u, -p, -z, -D and -P
options with -f. -r, -R, -n, -l, -N and -c would make no sense to
combine. -l and -N would be fairly redundant because it would be better
to use a format of "%s\n" or "%s\0" so they should perhaps then be
declared obsolete. -P (and maybe -D) is also perhaps slightly
unfortunate because a %P format specification might be better.

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


  reply	other threads:[~2001-09-21 11:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-20 19:10 Oliver Kiddle
2001-09-20 20:33 ` Bart Schaefer
2001-09-21 10:58   ` Oliver Kiddle [this message]
2001-09-21 14:42     ` Bart Schaefer
2001-09-21 14:55 ` Peter Stephenson
2001-09-21 16:13   ` Oliver Kiddle
2001-09-21 17:10     ` Peter Stephenson
2001-09-24  4:42     ` print -z (Re: PATCH: printf builtin) Bart Schaefer
2001-09-24  9:18       ` Peter Stephenson
2001-09-24 16:41         ` PATCH (docs): " Bart Schaefer
2001-09-24 10:50   ` PATCH: printf builtin Peter Stephenson
2001-09-25 17:17     ` Oliver Kiddle
2001-09-25 17:57       ` Peter Stephenson
2001-10-05 14:54     ` Oliver Kiddle
2001-10-05 17:03       ` Peter Stephenson

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=3BAB1D55.8258B237@yahoo.co.uk \
    --to=okiddle@yahoo.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).