From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,552b7059e033056c X-Google-Attributes: gidfee84,public From: jcfowler@david.wheaton.edu (John C. Fowler) Subject: Re: Directory Prompt Date: 1996/05/10 Message-ID: <4mvvso$o92@david.wheaton.edu>#1/1 X-Deja-AN: 154160688 references: <4lt1oa$294@random.tpgi.com.au> <1996May6.165118.16175@isac.hces.com> <4mnec0$r34@gli <4mt0vt$4cu@csugrad.cs.vt.edu> organization: Wheaton College, Wheaton, IL newsgroups: comp.unix.osf.osf1 In article <4mt0vt$4cu@csugrad.cs.vt.edu>, Jeff Aitken wrote: >Dan Pop (danpop@mail.cern.ch) wrote: > >You can get around this with a 2-line prompt, which I prefer. I use >tcsh, and have the following aliases: > >alias setprompt 'set prompt="\n%B%n@%m%b:%/\n%% "' >alias cd "chdir \!*; setprompt" >alias pu "pushd \!*; setprompt" >alias po "popd \!*; setprompt" >setprompt > >You can do the same sort of thing in bash fairly easily. >-- >Jeff Aitken Well gosh, in tcsh, there is a predefined alias, precmd, which gets run every time just before the prompt comes up. Thus instead of realiasing cd, popd, and pushd, just do the following: alias precmd 'set prompt="\n%B%n@%m%b:%/\n%% "' That will reset the prompt just before every time the prompt comes up. john... 'When peace like a river attendeth my way, when sorrows like sea billows roll; Whatever my lot thou hast taught me to say, "It is Well! It is Well, with my soul!"'