Path: utzoo!mnetor!uunet!tektronix!reed!psu-cs!winterss From: winterss@psu-cs.UUCP (Stafford Winters ) Newsgroups: comp.unix.questions Subject: Re: `pwd` in Shell prompt Message-ID: <589@psu-cs.UUCP> Date: 3 Apr 88 20:36:18 GMT References: <12752@brl-adm.ARPA> Reply-To: winterss@psu-cs.UUCP (Stafford Winters (CS 457)) Organization: Dept. of Computer Science, Portland State University; Portland OR Lines: 27 In article <12752@brl-adm.ARPA> parrish@nadc.arpa (D. Parrish) writes: > CSH: > To set your prompt variable to show the current path: > set prompt="`pwd`" > alias setprompt 'set prompt="`pwd`"' > alias cd 'cd \!* ; setprompt' > alias pd 'pushd \!* ; setprompt' > alias popd 'popd \!* ; setprompt' > I suggest using the string that is already calculated for you: set prompt="$cwd" alias cd 'cd \!* ; set prompt="$cwd"' alias pushd 'pushd \!* ; set prompt="$cwd"' etc. I find it helpful to highlight my directory as well. If you always use the same type of terminal, then you can insert the appropriate control sequences to do the highlighting. > > CSH: Insert the prompt=... stuff into your '.cshrc' file. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ______ / / --/ __. __/ (_/ (_/|_(_/_ Stafford `Tad' Winters Internet: winterss%psu-cs.cs.pdx.edu or winters%jacobs.cs.orst.edu UUCP: {ihnp4,tektronix}!{psueea!psu-cs!winterss,orstcs!jacobs!winters} BITNET (for some): IN%"winters%jacobs.cs.orst.edu"