Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!metro!cluster!necisa!boyd From: boyd@necisa.ho.necisa.oz.au (Boyd Roberts) Newsgroups: comp.unix.questions Subject: Re: cd function Message-ID: <2023@necisa.ho.necisa.oz.au> Date: 18 Feb 91 23:33:22 GMT References: <2PyFX1w163w@wvus.wciu.edu> <15235@smoke.brl.mil> Organization: NEC Information Systems Australia Pty. Ltd. Lines: 25 The V8 shell is the way to go: cd() { builtin cd $1 && case "$1" in '') PS1="% " ;; ..|*/..) PS1="`basename \`/bin/pwd\``% " ;; /) PS1="/% " ;; */*) PS1="`basename $1`% " ;; *) PS1="$1% " ;; esac } Of course, as Doug said, you need `builtin' or you have to rename the function. Boyd Roberts boyd@necisa.ho.necisa.oz.au ``When the going gets wierd, the weird turn pro...''