From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3) with ESMTP id HAA05729 for ; Thu, 23 May 1996 07:23:15 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id QAA04942; Wed, 22 May 1996 16:58:34 -0400 (EDT) Resent-Date: Wed, 22 May 1996 16:58:34 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199605222058.WAA31677@bolyai.cs.elte.hu> Subject: BOURNE_SHELL_GLOB option To: zsh-workers@math.gatech.edu (Zsh workers list) Date: Wed, 22 May 1996 22:58:49 +0200 (MET DST) Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL16 (25)] MIME-Version: 1.0 Content-Type: application/pgp; format=text; x-action=sign Content-Transfer-Encoding: 7bit Resent-Message-ID: <"PE7zR1.0.0D1.v_ten"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1136 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----BEGIN PGP SIGNED MESSAGE----- Here is the option I suggested. I called it BOURNE_SHELL_GLOB. I'll document it tomorrow. Zoltan *** Src/globals.h 1996/05/19 01:53:13 2.13 --- Src/globals.h 1996/05/20 12:39:57 *************** *** 632,637 **** --- 632,638 ---- {"autoremoveslash", AUTOREMOVESLASH}, {"autoresume", AUTORESUME}, {"bgnice", BGNICE}, + {"bourneshellglob", BOURNESHELLGLOB}, {"braceccl", BRACECCL}, {"bsdecho", BSDECHO}, {"cdablevars", CDABLEVARS}, *** Src/zsh.h 1996/05/19 01:53:13 2.13 --- Src/zsh.h 1996/05/20 12:40:03 *************** *** 1067,1072 **** --- 1067,1073 ---- #define CSHJUNKIEHISTORY '\037' #define MAGICEQUALSUBST '\040' #define GLOBSUBST '\041' + #define BOURNESHELLGLOB '\042' #define PROMPTSUBST '\043' #define ALWAYSLASTPROMPT '\044' #define COMPLETEALIASES '\045' *** Src/init.c 1996/05/12 17:16:18 2.17 --- Src/init.c 1996/05/22 20:37:04 *************** *** 211,216 **** --- 211,217 ---- opts[NOBADPATTERN] = OPT_SET; opts[PROMPTSUBST] = OPT_SET; opts[NOMULTIOS] = OPT_SET; + opts[BOURNESHELLGLOB] = OPT_SET; } /* If we are invoked as "sh", ignore escapes in echo. * *** Src/glob.c 1996/05/19 21:58:00 2.13 --- Src/glob.c 1996/05/22 20:56:21 *************** *** 2124,2134 **** break; case '^': case '#': case '(': case '|': case ')': ! case '~': ! if (unset(EXTENDEDGLOB)) break; default: for (t = ztokens; *t; t++) --- 2124,2136 ---- break; case '^': case '#': + case '~': + if (unset(EXTENDEDGLOB)) + break; case '(': case '|': case ')': ! if (isset(BOURNESHELLGLOB)) break; default: for (t = ztokens; *t; t++) *** Src/lex.c 1996/05/19 02:19:58 2.20 --- Src/lex.c 1996/05/22 20:52:32 *************** *** 637,648 **** add(Meta); break; case LX2_OUTPAR: ! if ((sub || in_brace_param) && unset(EXTENDEDGLOB)) break; if (!in_brace_param && !pct--) ! if (sub) break; ! else goto brk; c = Outpar; break; --- 637,649 ---- add(Meta); break; case LX2_OUTPAR: ! if ((sub || in_brace_param) && isset(BOURNESHELLGLOB)) break; if (!in_brace_param && !pct--) ! if (sub) { ! pct = 0; break; ! } else goto brk; c = Outpar; break; *************** *** 652,658 **** break; else goto brk; ! if (isset(EXTENDEDGLOB) || incasepat || (!sub && !in_brace_param)) c = Bar; break; case LX2_STRING: --- 653,659 ---- break; else goto brk; ! if (unset(BOURNESHELLGLOB) || incasepat || (!sub && !in_brace_param)) c = Bar; break; case LX2_STRING: *************** *** 733,739 **** c = Outbrack; break; case LX2_INPAR: ! if ((sub || in_brace_param) && unset(EXTENDEDGLOB)) break; if (!in_brace_param) { if (!sub) { --- 734,740 ---- c = Outbrack; break; case LX2_INPAR: ! if ((sub || in_brace_param) && isset(BOURNESHELLGLOB)) break; if (!in_brace_param) { if (!sub) { -----BEGIN PGP SIGNATURE----- Version: 2.6.3i Charset: noconv iQCVAwUBMaOABgupSCiLN749AQEJ0AP/Te60JDedwFPdyvrapfQwJP7X/B9JKsj0 Suud0Q3zEz0mC7vpF0kP6IYtFbX6xEw9A/Ktl00MctRnwdikr7LITu/DsWSo0NED aoyPJDka26Q/5epgXqyNXPFmlbsMOCMD2JnGeOCsG057LlNE8+dfe+bNGPf7lsel 00S4k6jF8a8= =4X5/ -----END PGP SIGNATURE-----