Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

New zle_misc.c patch (fixes terminal initialization in putprompt)



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;



Messages sorted by: Reverse Date, Date, Thread, Author