Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!mips!pacbell.com!att!bu.edu!nntp-read!jc From: jc@raven.bu.edu (James Cameron) Newsgroups: comp.unix.questions Subject: Re: $cwd in prompt??? Message-ID: Date: 18 Jun 91 06:13:04 GMT References: <17153@darkstar.ucsc.edu> Sender: news@bu.edu Distribution: comp.unix.questions Organization: What do you mean 'That *can't* be done????' Lines: 43 In-reply-to: bjsvec@cats.ucsc.edu's message of 18 Jun 91 03:41:07 GMT >>>>> On 18 Jun 91 03:41:07 GMT, bjsvec@cats.ucsc.edu (Brandon Jason Svec) said: ||> Can someone tell me how to get my prompt to show the current working ||> directory? ||> I have tried something like this: ||> alias cd "cd;set prompt = $cwd" # so it will update each time I cd ||> set prompt = $cwd ||> email please... ||> thanks, ||> brandon Well, a basic solution to this would be this alias which could go in either your .alias file if you have one, or .login: alias cd 'cd \!*;set prompt = "$HOST [$cwd] % "' which gives me when I am in my home directory: raven [/u4/home/jc] % The above alias can be modified for X11 users to change the title and name of the current xterm. jc -- -- James Cameron (jc@raven.bu.edu) Signal Processing and Interpretation Lab. Boston, Mass (617) 353-2879 ------------------------------------------------------------------------------ "But to risk we must, for the greatest hazard in life is to risk nothing. For the man or woman who risks nothing, has nothing, does nothing, is nothing." (Quote from the eulogy for the late Christa McAuliffe.)