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 werple.net.au (8.7/8.7.1) with ESMTP id GAA21574 for ; Sat, 17 Feb 1996 06:44:30 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA15220; Fri, 16 Feb 1996 14:22:45 -0500 (EST) Resent-Date: Fri, 16 Feb 1996 14:22:45 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199602161922.UAA04082@bolyai.cs.elte.hu> Subject: Re: Hey, who did this ?!?! To: esky@cs.ucla.edu (Eskandar Ensafi) Date: Fri, 16 Feb 1996 20:22:22 +0100 (MET) Cc: zsh-users@math.gatech.edu, zsh-workers@math.gatech.edu In-Reply-To: <9602161834.AA08343@marathon.cs.ucla.edu> from "Eskandar Ensafi" at Feb 16, 96 10:34:26 am 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.4 PL24 PGP3 *ALPHA*] Mime-Version: 1.0 Content-Type: application/pgp Content-Transfer-Encoding: 7bit Resent-Message-ID: <"NPbyy.0.kj3.4cD9n"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/766 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > A while back, we made certain corrections to zsh so that termcap entries > are correctly intitialized in non-interactive shells, in order to allow > print -P '%B...%b' sequences and similar text attributes/cursor motion > commands to work properly in shell scripts. Believe it or not, it's not > very useful to type print -P '%Bhello%b' to yourself in an interactive > shell; it's more useful in a script, where you want to make prompts and > messages stand out in certain instances. The problem with termcap initialization was that on some operating systems (e.g. on solaris) the termcap initialization suspended all backgrounded zsh scripts with SIGTTOU. I think this was enough reason to disable termcap initialization. But to make scripts using termcap happy we have to initialize termcap entries when necessary. It seems that everyone forgot about print -P. Below is a short patch to this. It may be better to put it somewhere else it may not even work but I'm too tired and busy to think about it or test it (but it shoud work). > Also, when I used prompt truncation in my right prompt, the size of my > prompt would become shorter/longer as I resized my xterm window, thus > fitting as much of the directory name as possible. This no longer happens. > Did someone alter the places where putprompt() was called? If the calls > to putprompt() seemed excessive (perhaps inefficient?), I hope you now > realize that there was a good reason for it!!! I do not know that. > Oh well, this is what I get for not being as active as I used to be in > this group. I might just have to stick around a bit longer... :-) Recently most of us become less active. I'm now silently working on making zsh really 8-bit clean and it partly works but still there are a lot of things to do to really achieve this goal. Most of the necessary modifications are quite simple and straightforward once you know where you have to change something. My progress is quite slow as I have a lot of other things to do and I'll go skiing on Sunday for a week which will slow down this development even more :-). All the bests, Zoltan Here is the patch I promised: *** Src/builtin.c 1995/12/22 13:20:15 1.16 --- Src/builtin.c 1996/02/16 19:06:15 *************** *** 4093,4098 **** --- 4093,4100 ---- func != BIN_ECHO && !ops['e'], &nnl); /* -P option -- interpret as a prompt sequence */ if(ops['P']) { + if (!termok && unset(INTERACTIVE)) + init_term(); char *arg = putprompt(args[n], &len[n], NULL, 0); args[n] = (char *)alloc(len[n] + 1); memcpy(args[n], arg, len[n]);