* 'Nother patch
@ 1995-07-22 2:39 Zefram
0 siblings, 0 replies; only message in thread
From: Zefram @ 1995-07-22 2:39 UTC (permalink / raw)
To: Z Shell workers mailing list
-----BEGIN PGP SIGNED MESSAGE-----
The patch below adds a ksh kompatibility option, NO_MULTIOS. It's all
quite self-explanatory.
-zefram
*** 1.3 1995/07/21 21:34:09
--- Src/zsh.h 1995/07/22 02:13:15
***************
*** 879,884 ****
--- 879,885 ----
#define CHASELINKS 'w'
#define XTRACE 'x'
#define SHWORDSPLIT 'y'
+ #define NOMULTIOS '\001'
#define HISTNOSTORE '\3'
#define EXTENDEDGLOB '\5'
#define GLOBCOMPLETE '\6'
*** 1.2 1995/07/21 21:03:17
--- Src/globals.h 1995/07/22 02:23:34
***************
*** 678,683 ****
--- 678,684 ----
{"nohistbeep", NOHISTBEEP},
{"nohup", NOHUP},
{"nolistbeep", NOLISTBEEP},
+ {"nomultios", NOMULTIOS},
{"nonomatch", NONOMATCH},
{"nopromptcr", NOPROMPTCR},
{"norcs", NORCS},
*** 1.4 1995/07/21 21:41:55
--- Src/init.c 1995/07/22 02:09:55
***************
*** 180,187 ****
* GLOBSUBST - text from parameters can be globbed *
* LOCALOPTIONS - option settings are local to functions *
* NOEQUALS - Don't perform equals substitution *
! * NOBADPATTERN - Leave bad glob patterns alone. *
! * PROMPTSUBST - Perform substitutions in prompts */
if (strcmp(zsh_name, "sh") == 0 || strcmp(zsh_name, "ksh") == 0) {
opts[NOBANGHIST] = OPT_SET;
--- 180,188 ----
* GLOBSUBST - text from parameters can be globbed *
* LOCALOPTIONS - option settings are local to functions *
* NOEQUALS - Don't perform equals substitution *
! * NOBADPATTERN - Leave bad glob patterns alone *
! * PROMPTSUBST - Perform substitutions in prompts *
! * NOMULTIOS - Don't do implicit tees/cats */
if (strcmp(zsh_name, "sh") == 0 || strcmp(zsh_name, "ksh") == 0) {
opts[NOBANGHIST] = OPT_SET;
***************
*** 196,201 ****
--- 197,203 ----
opts[NOEQUALS] = OPT_SET;
opts[NOBADPATTERN] = OPT_SET;
opts[PROMPTSUBST] = OPT_SET;
+ opts[NOMULTIOS] = OPT_SET;
}
/* If we are invoked as "sh", ignore escapes in echo. *
*** 1.6 1995/07/21 21:40:03
--- Src/exec.c 1995/07/22 02:17:46
***************
*** 935,945 ****
{
int pipes[2];
! if (!mfds[fd1]) { /* starting a new multio */
! mfds[fd1] = (struct multio *) alloc(sizeof(struct multio));
!
! if (!forked && fd1 != fd2 && fd1 < 10)
! save[fd1] = movefd(fd1);
redup(fd2, fd1);
mfds[fd1]->ct = 1;
mfds[fd1]->fds[0] = fd1;
--- 935,946 ----
{
int pipes[2];
! if (!mfds[fd1] || isset(NOMULTIOS)) {
! if(!mfds[fd1]) { /* starting a new multio */
! mfds[fd1] = (struct multio *) alloc(sizeof(struct multio));
! if (!forked && fd1 != fd2 && fd1 < 10)
! save[fd1] = movefd(fd1);
! }
redup(fd2, fd1);
mfds[fd1]->ct = 1;
mfds[fd1]->fds[0] = fd1;
*** 1.1 1995/07/22 02:30:01
--- Etc/BUGS 1995/07/22 02:32:08
***************
*** 1,15 ****
-*- text -*-
------------------------------------------------------------------------
- % ( echo foo ; echo bar 1>& 2 ) 2>&1 1>/dev/null | cat
- bar
- foo
- % ksh
- $ ( echo foo ; echo bar 1>& 2 ) 2>&1 1>/dev/null | cat
- bar
-
- This is not exactly a bug, but an effect of the multiple IO
- redirection. It is a (k)sh incompatibility, though.
- ------------------------------------------------------------------------
Completion has a habit of doing the wrong thing after a
backslash/newline.
------------------------------------------------------------------------
--- 1,5 ----
-----BEGIN PGP SIGNATURE-----
Version: 2.6.i
iQBVAgUBMBBko2WJ8JfKi+e9AQHA6wH9Hj3h0Wdvka4VvIdsorJGVDSqLuM9Tiwo
DAFJDrsbkAD/cHeOPLFxsY1J+ngxC2qYrUxM95LUyW8l10i/1WbtYQ==
=FUL8
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~1995-07-22 2:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-07-22 2:39 'Nother patch 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).