[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Interactive behaviour
From: |
Gary V. Vaughan |
Subject: |
Re: Interactive behaviour |
Date: |
Thu, 21 Sep 2006 01:45:47 +0100 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Eric,
On 20 Sep 2006, at 13:56, Eric Blake wrote:
According to Stepan Kasal on 9/20/2006 5:21 AM:
Hello,
current CVS version of m4 sets interactive mode iff the stdin is a
tty. I think it would be better to set interactive mode iff the
stdin, the stdout, and the stderr are a tty. (Something like the
patch below.)
How about something like what POSIX requires of sh (where, of
course, m4's
- -e takes the place of sh's -i)?
"If the -i option is present, or if there are no operands and the
shell's
standard input and standard error are attached to a terminal, the
shell is
considered to be interactive."
As far as I can see, the only reason --interactive is -e instead of
-i is
due to command-line compatibility with SysV implementations such as
Solaris m4. But should I add -i as a synonym for -e as a followon
patch?
Yes, I think that is an excellent idea. From http://www.gnu.org/prep/
standards/html_node/Option-Table.html:
`interactive'
`-i' in `cp', `ln', `mv', `rm'; `-e' in `m4'; `-p' in `xargs';
`-w' in `tar'.
So, `-i, --interactive' in help, with `-e' as a silent compatibility
option
seems sanest to me. We might want to Cc: Karl Berry in on the patch
incase
he wants to amend the GCS document?
It didn't help that NEWS didn't mention when -b was added.
Fortunately,
CVS sleuthing isn't too hard, and I found it in version 1.10 of
main.c in
Aug 2001, the same month as the mythical 1.4q release (and since I
haven't
seen a 1.4q tarball, I just documented it for the upcoming 1.9b).
My bad. I was in the process of taking over m4 from Rene, and we both
thought the other would make the release.
Cheers,
Gary
- --
Gary V. Vaughan ())_. gary@
{lilith.warpmail.net,gnu.org},address@hidden
Research Scientist ( '/ http://blog.azazil.net
GNU Hacker / )= http://www.gnu.org/software/{libtool,m4}
Technical Author `(_~)_ http://sources.redhat.com/autobook
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFFEeC/FRMICSmD1gYRAsGDAJ9jBOEoaZSL6N71FvPL779IpdeqhgCfREh+
pCWNvigbZ55osUw/sA+bwEw=
=dnYs
-----END PGP SIGNATURE-----