*BSD News Article 29195


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!ihnp4.ucsd.edu!swrinde!gatech!howland.reston.ans.net!vixen.cso.uiuc.edu!newsrelay.iastate.edu!news.iastate.edu!ponderous.cc.iastate.edu!michaelv
From: michaelv@iastate.edu (Michael L. VanLoon)
Newsgroups: comp.os.386bsd.questions
Subject: Re: pwd in the prompt
Date: 5 Apr 94 17:07:39 GMT
Organization: Iowa State University, Ames, Iowa
Lines: 26
Message-ID: <michaelv.765565659@ponderous.cc.iastate.edu>
References: <2nrmmu$lql@hermes.unt.edu> <2ns0kl$gu9@Germany.EU.net>
NNTP-Posting-Host: ponderous.cc.iastate.edu

In <2ns0kl$gu9@Germany.EU.net> bs@Germany.EU.net (Bernard Steiner) writes:

>In article <2nrmmu$lql@hermes.unt.edu>, wilsonm@dale.hsc.unt.EDU (Mike Wilson) writes:

>|> Simply, I want to have the path in the prompt, I have tried several
>|> different ways but have yet to get it to work correctly. Does anyone out
>|> there have something I can use? 

>Not me; alas, I know for sure that this is in one of the comp.unix FAQ's.

What shell are you using?  It's trivial with tcsh: "set prompt='%c> '".
I use something a little more complex in tcsh:
	set prompt="[%B%n%b@%B%m%b]%B%c3%b%# "
This gives me my username (in case I'm doing maintenance under a
different uid), hostname, and last three parts of path.

If you want to do it with one of the more basic shells, check out the
FAQ in comp.unix.shells.


-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 Michael L. VanLoon                 Iowa State University Computation Center
    michaelv@iastate.edu                    Project Vincent Systems Staff
  Free your mind and your machine -- NetBSD free Un*x for PC/Mac/Amiga/etc.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -