Date: Tue, 9 Jul 1996 18:57:54 +0000 (GMT) From: Gabor Zahemszky <zgabor@CoDe.hu> To: freebsd-questions@freebsd.org Cc: rcutter@ctgusa.com Subject: Re: Changing prompt Message-ID: <199607091857.SAA01798@CoDe.CoDe.hu> In-Reply-To: <1.5.4.32.19960705154424.008cda38@ctgusa.com> from "Ryan Cutter" at Jul 5, 96 11:44:24 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > Hi, > > How can I change my prompt in FreeBSD to reflect the current > directory I'm in? You saw it in csh/bash. Tcsh is the same as csh, (pd)ksh is the same as bash, but you cannot do the \X stuff, only PS1='$PWD > '. And finally here it is in the standard shell (sh, precisely: ash): cd() { chdir "$@" PS1="`pwd` > " } (It works only in FBSD's sh, in traditional shells, you cannot make a function using the same name as an internal command; and in traditional sh's hasn't got chdir.) -- Gabor Zahemszky <zgabor@CoDe.hu> -:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:- Earth is the cradle of human sense, but you can't stay in the cradle forever. Tsiolkovsky
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199607091857.SAA01798>