Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 exptools 1/6/84; site ihuxl.UUCP
Path: utzoo!linus!decvax!harpo!whuxlm!whuxl!houxm!ihnp4!ihuxl!bamford
From: bamford@ihuxl.UUCP (bamford)
Newsgroups: net.sources
Subject: Re: some ksh aliases and functions
Message-ID: <1394@ihuxl.UUCP>
Date: Thu, 11-Oct-84 15:21:34 EDT
Article-I.D.: ihuxl.1394
Posted: Thu Oct 11 15:21:34 1984
Date-Received: Sat, 13-Oct-84 02:42:42 EDT
References: <3833@cbscc.UUCP>
Organization: AT&T Bell Labs, Naperville, IL
Lines: 32

Here is a function to set the prompt to the current directory.  Very nice
if you tend to get lost easily.

----------------------------------------------------------------------
function fancy_cd
{
	if [ $# -ne 0 ]
	then
		cd $*
	else
		cd
	fi
	PS1="${PWD} "
}
alias cd=fancy_cd
----------------------------------------------------------------------

The function MUST be defined before the alias.


				Harold Bamford
				AT&T Bell Labs
				(cornet) 8-367-1866
				Naperville, Ill
				(312) 979-1866
-- 

				Harold Bamford
				AT&T Bell Labs
				(cornet) 8-367-1866
				Naperville, Ill
				(312) 979-1866