From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (euclid.skiles.gatech.edu [130.207.146.50]) by werple.net.au (8.7/8.7.1) with ESMTP id GAA10530 for ; Sat, 2 Mar 1996 06:21:39 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA08308; Fri, 1 Mar 1996 14:09:02 -0500 (EST) Resent-Date: Fri, 1 Mar 1996 14:09:02 -0500 (EST) Message-Id: <9603011907.AA00385@marathon.cs.ucla.edu> To: zsh-workers@math.gatech.edu Subject: New zle_misc.c patch (fixes terminal initialization in putprompt) Date: Fri, 01 Mar 1996 11:07:00 -0800 From: Eskandar Ensafi Resent-Message-ID: <"oloJu2.0.k12.DjqDn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/791 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello, In order for %-sequences to be recognized in prompts (e.g., PROMPT3 in "select" loops) and "print -P" statements, the terminal escape sequences must be initialized in noninteractive shells. The following patch does exactly this, on demand, when putprompt() is called. Later, - Eskandar *** zle_misc.c.orig Fri Mar 1 09:58:13 1996 --- zle_misc.c Fri Mar 1 10:19:22 1996 *************** *** 742,747 **** --- 742,750 ---- return ztrdup(""); } + if (!termok && (unset(INTERACTIVE))) + init_term(); + bracepos = -1; fm = fmin; lensb = 0;