Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!hao!boulder!cdash From: cdash@boulder.UUCP (Charles Shub) Newsgroups: comp.unix.questions,comp.unix.wizards Subject: Re: Prompt changing on the fly Message-ID: <318@boulder.UUCP> Date: Mon, 19-Jan-87 19:52:26 EST Article-I.D.: boulder.318 Posted: Mon Jan 19 19:52:26 1987 Date-Received: Wed, 21-Jan-87 00:02:01 EST References: <432@ethz.UUCP> Reply-To: cdash@nike.UUCP (Charles Shub) Distribution: world Organization: University of Colorado at Colorado Springs Lines: 11 Xref: mnetor comp.unix.questions:762 comp.unix.wizards:655 In article <432@ethz.UUCP> wyle@ethz.UUCP (Mitchell Wyle) writes: >Does anyone out there have a shell script / program to change >the prompt DYNAMICALLY after each [CR]? > it is simple to define a command/alias to set your prompt and then redefine commands to also set your prompt alias cd 'chdir \!*;SP' alias SP 'set prompt="$MACHINE-`basename $cwd` \! > "' then the prompt does what you want