Subject: Re: CSh/TCSh path setup
To: NetBSD \(Mac68k\) <port-mac68k@netbsd.org>
From: Ryan La Riviere <larz@cbis.ece.drexel.edu>
List: port-mac68k
Date: 12/24/2001 05:57:31
On 12/23/01 9:59 PM, "Mark Benson" <mdb299@soton.ac.uk> wrote:

> Does anyone know how to construct a 'set prompt =' up for tcsh that
> looks a bit like:
> 
> server /path/folder:
> 
> I'm used to something approaching it in OS X (with square brackets
> for some reason) and I don't have a display of what path I'm on
> which is just plain confusing.

This is what I had copied from my OS X box and it has worked well so far:

        # Set up prompt
        set promptchars = "%#"
        if ("$version" =~ tcsh*) then
          set prompt = "[%m:%c3] %n%# "
        else
          if ($uid) then
            set prompt = "[$host] $user% "
          else
            set prompt = "[$host] $user# "
          endif
        endif

Which is inside a:

if ($?prompt) then

statement.

That's my story and I'm sticking to it.

-- 

Ryan La Riviere

System Administrator; Drexel University
215.895.6010
<http://staff.tdec.drexel.edu/~edljedi/>