Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!gargoyle!ihnp4!homxb!mtuxo!mtune!quincy!icus!lenny From: lenny@icus.UUCP (Lenny Tropiano) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Setting PS1 prompt to show current directory. Message-ID: <35@icus.UUCP> Date: Sun, 15-Nov-87 07:47:59 EST Article-I.D.: icus.35 Posted: Sun Nov 15 07:47:59 1987 Date-Received: Tue, 17-Nov-87 06:05:38 EST References: <275@caus-dp.UUCP> Reply-To: lenny@icus.UUCP (Lenny Tropiano) Organization: ICUS Computer Group, Islip, NY Lines: 34 Keywords: How do you do it? Summary: Use a function like this... Xref: mnetor comp.unix.questions:4926 comp.unix.wizards:5479 In article <275@caus-dp.UUCP> dansh@caus-dp.UUCP (Dan Harris) writes: >I am currently using the Bourne shell on an Intel 310 xenix system >and I was wondering how to set the cursor prompt to indicate what >directory I am working in. > My solution is to constantly reset PS1 environment variable after each invocation of "cd": (place this in your .profile) c() { cd $* PS1="`pwd`] " ; export PS1 } Now change directories with: $ c / /] c usr /usr] c /bin /bin] Hope this helps. Lenny -- ============================ US MAIL: Lenny Tropiano, ICUS Computer Group IIIII CCC U U SSSS PO Box 1 I C C U U S Islip Terrace, New York 11752 I C U U SSS PHONE: (516) 968-8576 [H] (516) 582-5525 [W] I C C U U S AT&T MAIL: ...attmail!icus!lenny TELEX: 154232428 IIIII CCC UUU SSSS UUCP: ============================ ...{uunet!godfre, mtune!quincy}!\ ...{ihnp4, boulder, harvard!talcott, skeeve, ptsfa}! >icus!lenny "Usenet the final frontier" ...{cmcl2!phri, hoptoad}!dasys1!/