pwd prompts in unix

Mike Lijewski lijewski at theory.TC.Cornell.EDU
Tue Jun 25 01:46:28 AEST 1991


In article <1991Jun24.140512.6143 at uokmax.ecn.uoknor.edu> jkmedcal at uokmax.ecn.uoknor.edu (Jeff Medcalf) writes:
>
>ketell at tolkien (Gregory Ketell) writes:
>
>>CSH:
>>	Create two aliases in your .cshrc file
>>		alias cd	'cd \!*;promp'
>>		alias promp	'set prompt = "`hostname`:`pwd` ! > "'
>
>This could be done in a single alias:
>
>	alias cd 'cd \!* ; set prompt = "`hostname`:`pwd` ! > "'
>
>and then follow this with a cd . command (which would stay in the cwd but
>set the prompt.

And if you want pushd and popd to work correctly, you'll probably need the
following line:

alias pushd 'pushd \!*; cd .'; alias popd 'popd; cd .';

>Jeff Medcalf   jkmedcal at uokmax.{uucp|ecn.uoknor.edu}    !chinet!uokmax!jkmedcal

-- 
Mike Lijewski  (H)607/272-0238 (W)607/254-8686
Cornell National Supercomputer Facility
ARPA: mjlx at eagle.tc.cornell.edu  BITNET: mjlx at cornellf.bitnet
SMAIL:  25 Renwick Heights Road, Ithaca, NY  14850



More information about the Comp.unix.wizards mailing list