zsh-workers
 help / color / mirror / code / Atom feed
* 3.1.5-pws-15 prompt change
@ 1999-04-18 23:56 Timothy J Luoma
  1999-04-19  8:05 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Timothy J Luoma @ 1999-04-18 23:56 UTC (permalink / raw)
  To: zsh-workers


# Here's my PROMPT definition:

ONCON=`who | fgrep ' console ' | awk '{print $1}'`

if [ "$ONCON" = "$USERNAME" ]; then

	REMOTE_HOST=""
	LOCAL_HOST=""
else
	REMOTE_HOST="(from $RHOST)"
	LOCAL_HOST="@%m"

fi

PROMPT='
------------------------------ %t/%T ------------------------------
%S[OLDPWD: $OLDPWD]
   [PWD: %~]%s
%B%n$LOCAL_HOST%b $REMOTE_HOST
'

# end prompt



w/ 3.1.4 it looks like this:

------------------------------  7:54PM/19:54 ------------------------------
[OLDPWD: /]
   [PWD: ~]
tjl
*

[where * shows where the cursor is]



w/ 3.1.5 is looks like this:

------------------------------  7:54PM/19:54 ------------------------------
[OLDPWD: /]
   [PWD: ~]
tjl

*

Now, why is there a blank line there after my username?

TjL


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 3.1.5-pws-15 prompt change
  1999-04-18 23:56 3.1.5-pws-15 prompt change Timothy J Luoma
@ 1999-04-19  8:05 ` Peter Stephenson
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1999-04-19  8:05 UTC (permalink / raw)
  To: zsh-workers

Timothy J Luoma wrote:
> Now, why is there a blank line there after my username?

This seems to be due to the lines

	    if (lpromptw == 0)
		zputs("\n", shout);	/* works with both hasam and !hasam */

which occur a couple of times in zle_refresh.c.  I don't know why they're
there, so I don't know how to alter them.  Maybe the test needs to be
something like if (lpromptw == 0 && lprompth == 1) ?

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-04-19  8:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-18 23:56 3.1.5-pws-15 prompt change Timothy J Luoma
1999-04-19  8:05 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).