Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!topaz.rutgers.edu!ron From: ron@topaz.rutgers.edu (Ron Natalie) Newsgroups: comp.unix.questions Subject: Re: ksh questions Message-ID: <15249@topaz.rutgers.edu> Date: Fri, 2-Oct-87 14:05:37 EDT Article-I.D.: topaz.15249 Posted: Fri Oct 2 14:05:37 1987 Date-Received: Tue, 6-Oct-87 04:44:39 EDT References: <692@hsi.UUCP> <10342@duke.cs.duke.edu> Organization: Rutgers Univ., New Brunswick, N.J. Lines: 28 Here's a couple I wrote for the 5R2 Bourne Shell: I don't set the prompt to the directory names because I find it disgusting, but you can do that by doing PS1="$DIRSTACK" in both popd and pushd. which() { whatis $* } pushd() { if cd $1 then DIRSTACK="$1 $DIRSTACK" echo $DIRSTACK fi } popd() { set $DIRSTACK shift DIRSTACK="$*" if test "$1" = "" then echo $HOME else echo $DIRSTACK fi cd $1 }