zsh-users
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: DervishD <raul@pleyades.net>
Cc: zsh-users@sunsite.dk
Subject: Re: read -s
Date: Thu, 15 Aug 2002 12:57:17 +0100	[thread overview]
Message-ID: <E17fJFe-0004kX-00@bimbo.logica.co.uk> (raw)
In-Reply-To: <3D5B7B8C.mail12L17CVMQ@viadomus.com>

On 15 Aug, you wrote:

> >I expect it would be fairly easy to add this -s option to the read in zsh.
> >Does anyone think it would be worth doing?
> 
>     IMHO the stty solution is cleaner and more portable. BASH is
> bloated with things like those, please don't imitate ;))

Well Peter has already posted a patch for it on -workers though he
hasn't committed it to CVS. The patch isn't big enough to upset me as
being bloat but I can see your point. If it doesn't go in, it might be
a good idea to add the stty trick to the FAQ instead. Incidentally, in
ksh93, the -s option to read adds the line to the history. Not that I'd
suggest copying that particularly because the read can always be
followed by a print -s and because I'd tend to use vared instead of
read in such circumstances anyway.

>From the bash/ksh compatibility perspective, what might be useful would
be to add the -d option to read which both ksh93 and bash have. It lets
you specify a delimiter to stop reading at (instead of newline).

>     For example, bash has a non-POSIX, non-SuSv3 compliant
> implementation of 'printf' builtin, and zsh has one fully compliant,
> and this is applicable to more builtins. The '-s' flag to read is not
> necessary at all. UNIX has this policy (IMHO, again): keep it simple
> and divide the tasks among processes instead of bloating one of them.

Out of interest, in what way is bash's printf non-compliant? Also, zsh
4.0.x does not have a printf builtin. The printf in the 4.1 branch is
compliant to my knowledge but adds a good few features which go beyond
the standards.

Oliver

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.


  reply	other threads:[~2002-08-15 11:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-14 14:31 Oliver Sturm
2002-08-14 15:02 ` Oliver Kiddle
2002-08-15  7:49   ` Oliver Sturm
2002-08-15  9:59   ` DervishD
2002-08-15 11:57     ` Oliver Kiddle [this message]
2002-08-16 11:30       ` DervishD
2002-08-19 16:34 Chet Ramey

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=E17fJFe-0004kX-00@bimbo.logica.co.uk \
    --to=okiddle@yahoo.co.uk \
    --cc=raul@pleyades.net \
    --cc=zsh-users@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).