Csh prompt problem

Jonathan I. Kamens jik at athena.mit.edu
Mon Feb 6 23:27:05 AEST 1989


In article <20005 at agate.BERKELEY.EDU> laba-3hd at e260-3a.berkeley.edu
(Sam Shen) writes:
>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"" % "
>
>...
>
>[Problems with a directory named *... why would anybody want a
> directory named *?  Anyway...]

This'll do the trick, I think:

(pit-manager) src % alias cd
chdir !*; set noglob; prom; unset noblob

(pit-manager) src % alias prom
set prompt = "($host) ""$cwd:t"" % "

(pit-manager) src % mkdir '*'
(pit-manager) src % cd '*'
(pit-manager) * % 
Jonathan Kamens			              USnail:
MIT Project Athena				410 Memorial Drive, No. 223F
jik at Athena.MIT.EDU				Cambridge, MA 02139-4318
Office: 617-253-4261			      Home: 617-225-8218



More information about the Comp.unix.wizards mailing list