zsh-workers
 help / color / mirror / code / Atom feed
* -L option for ttyctl
@ 1997-03-22 16:37 Zefram
  1997-03-22 17:42 ` Zoltan Hidvegi
  0 siblings, 1 reply; 6+ messages in thread
From: Zefram @ 1997-03-22 16:37 UTC (permalink / raw)
  To: zsh-workers

-----BEGIN PGP SIGNED MESSAGE-----

This is an updated form of patch 719, which didn't get into the baseline
at the time.

 -zefram

 *** Doc/Zsh/builtins.yo	1997/03/20 03:53:46	1.10
 --- Doc/Zsh/builtins.yo	1997/03/22 14:11:08
 ***************
 *** 980,986 ****
   )
   findex(ttyctl)
   cindex(tty, freezing)
 ! item(tt(ttyctl) tt(-fu))(
   The tt(-f) option freezes the tty, and tt(-u) unfreezes it.
   When the tty is frozen, no changes made to the tty settings by
   external programs will be honored by the shell, except for changes in the
 --- 980,986 ----
   )
   findex(ttyctl)
   cindex(tty, freezing)
 ! item(tt(ttyctl) tt(-fuL))(
   The tt(-f) option freezes the tty, and tt(-u) unfreezes it.
   When the tty is frozen, no changes made to the tty settings by
   external programs will be honored by the shell, except for changes in the
 ***************
 *** 988,994 ****
   simply reset the settings to their previous values as soon as each
   command exits or is suspended.  Thus, tt(stty) and similar programs have
   no effect when the tty is frozen.  Without options it reports whether the
 ! terminal is frozen or not.
   )
   findex(type)
   item(tt(type) [ tt(-fpam) ] var(name) ...)(
 --- 988,995 ----
   simply reset the settings to their previous values as soon as each
   command exits or is suspended.  Thus, tt(stty) and similar programs have
   no effect when the tty is frozen.  Without options it reports whether the
 ! terminal is frozen or not; the (-L) option causes this report to be in the
 ! form of a tt(ttyctl) command to reproduce the current state.
   )
   findex(type)
   item(tt(type) [ tt(-fpam) ] var(name) ...)(
 *** Src/builtin.c	1997/03/22 01:55:35	1.64
 --- Src/builtin.c	1997/03/22 14:06:49
 ***************
 *** 3390,3399 ****
   int
   bin_ttyctl(char *name, char **argv, char *ops, int func)
   {
 !     if (ops['f'])
   	ttyfrozen = 1;
       else if (ops['u'])
   	ttyfrozen = 0;
       else
   	printf("tty is %sfrozen\n", ttyfrozen ? "" : "not ");
       return 0;
 --- 3390,3404 ----
   int
   bin_ttyctl(char *name, char **argv, char *ops, int func)
   {
 !     if(ops['f'] && ops['u']) {
 ! 	zerrnam(name, "illegal combination of options", NULL, 0);
 ! 	return 1;
 !     } else if (ops['f'])
   	ttyfrozen = 1;
       else if (ops['u'])
   	ttyfrozen = 0;
 +     else if(ops['L'])
 + 	printf("ttyctl -%c\n", ttyfrozen ? 'f' : 'u');
       else
   	printf("tty is %sfrozen\n", ttyfrozen ? "" : "not ");
       return 0;
 *** Src/hashtable.h	1997/03/22 07:00:55	1.28
 --- Src/hashtable.h	1997/03/22 14:07:00
 ***************
 *** 330,336 ****
       {NULL, "source", BINF_PSPECIAL, bin_dot, 1, -1, 0, NULL, NULL},
       {NULL, "suspend", 0, bin_suspend, 0, 0, 0, "f", NULL},
       {NULL, "test", 0, bin_test, 0, -1, BIN_TEST, NULL, NULL},
 !     {NULL, "ttyctl", 0, bin_ttyctl, 0, 0, 0, "fu", NULL},
       {NULL, "times", BINF_PSPECIAL, bin_times, 0, 0, 0, NULL, NULL},
       {NULL, "trap", BINF_PSPECIAL, bin_trap, 0, -1, 0, NULL, NULL},
       {NULL, "true", 0, bin_true, 0, -1, 0, NULL, NULL},
 --- 330,336 ----
       {NULL, "source", BINF_PSPECIAL, bin_dot, 1, -1, 0, NULL, NULL},
       {NULL, "suspend", 0, bin_suspend, 0, 0, 0, "f", NULL},
       {NULL, "test", 0, bin_test, 0, -1, BIN_TEST, NULL, NULL},
 !     {NULL, "ttyctl", 0, bin_ttyctl, 0, 0, 0, "fuL", NULL},
       {NULL, "times", BINF_PSPECIAL, bin_times, 0, 0, 0, NULL, NULL},
       {NULL, "trap", BINF_PSPECIAL, bin_trap, 0, -1, 0, NULL, NULL},
       {NULL, "true", 0, bin_true, 0, -1, 0, NULL, NULL},

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: ascii

iQCVAwUBMzPqBHD/+HJTpU/hAQHM6QQAqDtRpXdl74bRtlPadq6Abd8RonZpzWO2
927KiFfSMxYxmVn9O3U28QH98mU8EwnYAVTfJZwiP54WLrB+VOvwe2pQqhFJKYaO
0c5GdKszido64EH4fWkthjU4K9HMjwoieFiH9XQ1capPSPd4j7/3oA9Joi6bvqtG
JVtir4x5V2E=
=VsMO
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -L option for ttyctl
  1997-03-22 16:37 -L option for ttyctl Zefram
@ 1997-03-22 17:42 ` Zoltan Hidvegi
  1997-03-22 17:55   ` Zefram
  1997-03-22 18:27   ` Bart Schaefer
  0 siblings, 2 replies; 6+ messages in thread
From: Zoltan Hidvegi @ 1997-03-22 17:42 UTC (permalink / raw)
  To: Zefram; +Cc: zsh-workers

> This is an updated form of patch 719, which didn't get into the baseline
> at the time.

I still think that -L options should be changed to -p as required by POSIX.
These patches did not get into the baseline for exatly this reason.
Unfortunately -p is already used for other purposes by some builtins so it
would introduce incompatible changes :-(.

Zoltan


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -L option for ttyctl
  1997-03-22 17:42 ` Zoltan Hidvegi
@ 1997-03-22 17:55   ` Zefram
  1997-03-22 18:18     ` Zefram
  1997-03-22 18:27   ` Bart Schaefer
  1 sibling, 1 reply; 6+ messages in thread
From: Zefram @ 1997-03-22 17:55 UTC (permalink / raw)
  To: Zoltan Hidvegi

Zoltan Hidvegi wrote:
>I still think that -L options should be changed to -p as required by POSIX.

I never heard of that.  I think we should provide -p on those builtins
that POSIX requires it on, and the zsh traditional -L on everything.

-zefram


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -L option for ttyctl
  1997-03-22 17:55   ` Zefram
@ 1997-03-22 18:18     ` Zefram
  0 siblings, 0 replies; 6+ messages in thread
From: Zefram @ 1997-03-22 18:18 UTC (permalink / raw)
  To: Z Shell workers mailing list

On a quick examination, the only -p option I see that will actually get in
the way of anything is in compctl.  Are there any others?  I much prefer
-L, and we're now accustomed to it in some builtins, so maybe we should
use -L in everything except typeset and -p in everything except compctl.

-zefram


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -L option for ttyctl
  1997-03-22 17:42 ` Zoltan Hidvegi
  1997-03-22 17:55   ` Zefram
@ 1997-03-22 18:27   ` Bart Schaefer
  1997-03-22 18:55     ` Zefram
  1 sibling, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 1997-03-22 18:27 UTC (permalink / raw)
  To: Zoltan Hidvegi, zsh-workers

On Mar 22, 12:42pm, Zoltan Hidvegi wrote:
} 
} I still think that -L options should be changed to -p as required by POSIX.
} These patches did not get into the baseline for exatly this reason.
} Unfortunately -p is already used for other purposes by some builtins so it
} would introduce incompatible changes :-(.

Perhaps it's time for `emulate posix'.

-- 
Bart Schaefer                             Brass Lantern Enterprises
http://www.well.com/user/barts            http://www.nbn.com/people/lantern


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: -L option for ttyctl
  1997-03-22 18:27   ` Bart Schaefer
@ 1997-03-22 18:55     ` Zefram
  0 siblings, 0 replies; 6+ messages in thread
From: Zefram @ 1997-03-22 18:55 UTC (permalink / raw)
  To: schaefer; +Cc: Z Shell workers mailing list

Bart Schaefer wrote:
>Perhaps it's time for `emulate posix'.

I thought "emulate sh" was supposed to be emulating the POSIX shell.

-zefram


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-03-22 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-03-22 16:37 -L option for ttyctl Zefram
1997-03-22 17:42 ` Zoltan Hidvegi
1997-03-22 17:55   ` Zefram
1997-03-22 18:18     ` Zefram
1997-03-22 18:27   ` Bart Schaefer
1997-03-22 18:55     ` Zefram

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).