*BSD News Article 68710


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mira.net.au!news.mel.connect.com.au!munnari.OZ.AU!spool.mu.edu!howland.reston.ans.net!newsfeed.internetmci.com!btnet!zetnet.co.uk!dispatch.news.demon.net!demon!jraynard.demon.co.uk!not-for-mail
From: james@jraynard.demon.co.uk (James Raynard)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: Path in prompt !!?? help!
Date: 16 May 1996 01:51:32 -0000
Organization: A FreeBSD Box
Lines: 31
Message-ID: <4ne1n4$6h1@jraynard.demon.co.uk>
References: <DrG8vz.HCE@student.twi.tudelft.nl>
NNTP-Posting-Host: localhost.demon.co.uk
X-NNTP-Posting-Host: jraynard.demon.co.uk

In article <DrG8vz.HCE@student.twi.tudelft.nl>, M.V. van der Star <star> wrote:
>Hi, this may be a dumb question but I have recently installed FreeBSD 2.05
>and I wonder how to get my prompt to display the current directory !
>I have tried things like (from the top of my head) :
>
>set prompt = "$cwd -> "
>
>this sets the prompt to the directory I'm currently in but doesn't change when
>I move to a different directory !

I assume you're using csh. Here's something I stole from the
comp.unix.questions FAQ - put this in your .cshrc:-

alias setprompt 'set prompt="${cwd}% "'
setprompt           # to set the initial prompt
alias cd 'chdir \!* && setprompt'

Alternatively, upgrade to a more modern shell which has more friendly
ways of handling things like this - bash, ksh and tcsh are all in the
ports.

>Please help, and if you can, also send your reply to me through e-mail.
>Thanks!!
>My e-mail address is : s795238@dutiwy.twi.tudelft.nl

cc'd as requested.

-- 
James Raynard, Edinburgh, Scotland
jraynard@dial.pipex.com
james@jraynard.demon.co.uk