*BSD News Article 53430


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.kei.com!news.mathworks.com!newsfeed.internetmci.com!howland.reston.ans.net!agate!soda.CSUA.Berkeley.EDU!mconst
From: mconst@soda.CSUA.Berkeley.EDU (Michael Constant)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: DOS Style shell prompt
Date: 19 Oct 1995 20:12:04 GMT
Organization: Society for the Prevention of Cruelty to Vegetables, UC Berkeley
Lines: 11
Message-ID: <466bek$l5r@agate.berkeley.edu>
References: <814126352.7670@kiss.demon.co.uk>
NNTP-Posting-Host: soda.csua.berkeley.edu

Phil Taylor <phil@zipmail.co.uk> wrote:
>Anyway I have tried set prompt = $cwd and of course it sets it to the
>current dir forever. Im sure there is a way to do this in FBSD with
>sh/csh/bash/tcsh and I would like to know how to do it.

You can do it easily in tcsh by putting the proper sequences in your prompt
(RTFM), and you can hack it in any shell like this:

alias cd 'cd \!* ; set prompt = `pwd`"% "'
--
            Michael Constant (mconst@soda.csua.berkeley.edu)