Return to BSD News archive
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msunews!uwm.edu!math.ohio-state.edu!jussieu.fr!ensta!itesec!sidhe.frmug.fr.net!not-for-mail From: roberto@keltia.Freenix.FR (Ollivier Robert) Newsgroups: comp.unix.bsd.freebsd.misc Subject: Re: DOS Style shell prompt Date: 20 Oct 1995 10:07:42 GMT Organization: Herve Schauer Consultants Lines: 23 Message-ID: <467sde$m7k@sidhe.hsc-sec.fr> References: <814126352.7670@kiss.demon.co.uk> <4675hg$t7p@news.bu.edu> Reply-To: roberto@hsc.fr.net (Ollivier Robert) NNTP-Posting-Host: sidhe.hsc-sec.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In article <4675hg$t7p@news.bu.edu>, Mikhail Teterin <mi@bu.edu> wrote: > This are my settings (for tcsh, for csh, you'll have to change a bit), > if anyone can suggest something better -- please! This is ugly :-) : > alias setprompt 'set prompt="%m:${PWD}\(\!\) "' > alias cd "chdir \!* && setprompt" > alias ppd "popd \!* && setprompt" > alias psd "pushd \!* && setprompt" Stop ! For tcsh, bash and zsh, you don't need to "alias cd". Just setting $prompt is enough and the shell tracks directory changes and update the prompt. Here is mine : set prompt="%h [%T] %B%n%b@%m:%B%.2%b%# " I change it for some uids within a switch, also used to change xterm's title line to reflect some things. [ Cc: to Mikhail and Phil ] -- Ollivier ROBERT -=-=- FreeBSD 2.x FAQ maintainer -=-=- roberto@freebsd.org -=-=-=-=-=- Support The Free UNIX Systems ! FreeBSD Linux NetBSD -=-=-=-=-=-