Csh prompt problem

Sam Shen laba-3hd at e260-3a.berkeley.edu
Mon Feb 6 19:39:48 AEST 1989


I like to keep my current directory in my prompt.  I do it like this:

(e260-3a) laba-3hd % alias cd
cd !*; prom

(e260-3a) laba-3hd % alias prom
set prompt = "($host) ""$cwd:t"" % "

Where $host is the hostname (I'm on a cluster of about 60 Suns, so it's
easy to forget which one you're on) and $cwd is of course the current
directory.  Unfortunately, when I do this:

(e260-3a) laba-3hd % mkdir '*'

(e260-3a) laba-3hd % cd '*'

My prompt becomes:

(e260-3a) * /usr/wolf/c60a-3/sp89/laba-3hd/60a
/usr/wolf/c60a-3/sp89/laba-3hd/Mail /usr/wolf/c60a-3/sp89/laba-3hd/News
/usr/wolf/c60a-3/sp89/laba-3hd/awk /usr/wolf/c60a-3/sp89/laba-3hd/bin
/usr/wolf/c60a-3/sp89/laba-3hd/go_away /usr/wolf/c60a-3/sp89/laba-3hd/pic
/usr/wolf/c60a-3/sp89/laba-3hd/priv /usr/wolf/c60a-3/sp89/laba-3hd/ps
 /usr/wolf/c60a-3/sp89/laba-3hd/src %

(I put newlines in the prompt so it wouldn't be one long line.)

Whereas I want my prompt to be:

(e260-3a) * %

How do I do this?

					Sam Shen
					laba-3hd at web.berkeley.edu



More information about the Comp.unix.wizards mailing list