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

PATCH: Avoid echotc in comptest



This is an improvement on the change to keep the TERM setting of the pty
separate from that of the testing user's terminal.  I'm actually not sure
why the clear-to-eol is needed at all, but ...

Index: Test/comptest
===================================================================
diff -c -r1.3 comptest
--- Test/comptest	2001/06/08 03:53:14	1.3
+++ Test/comptest	2001/06/08 16:26:28
@@ -8,7 +8,6 @@
   zmodload -i zsh/zpty
 
   comptest_zsh=${ZSH:-zsh}
-  termcap_ce="$(echotc ce 2>/dev/null)"
 
   while getopts z: opt; do
     case $opt in
@@ -105,7 +104,7 @@
       log="${log[$mend[1]+1,-1]}"
       if (( 0 <= $mbegin[2] )); then
 	if [[ $match[2] != TC && $match[3] != \ # ]]; then
-	  print -lr "$match[2]:{${match[3]%$termcap_ce}}"
+	  print -lr "$match[2]:{${match[3]%${(%):-%E}}}"
 	fi
       elif (( 0 <= $mbegin[4] )); then
 	print -lr "DESCRIPTION:{$match[4]}"

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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