Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!rutgers!mcdchg!cxhq!pcash From: pcash@cxhq.UUCP (Peter Cash) Newsgroups: comp.unix.questions Subject: Re: alias to link cd to pwd Summary: print cwd in inverse video Message-ID: <1506@cxhq.UUCP> Date: 19 Jul 89 18:44:25 GMT References: <3710@tank.uchicago.edu> Organization: Computer X Inc., Schaumburg, IL USA Lines: 25 In article <3710@tank.uchicago.edu>, phd_ivo@gsbacd.uchicago.edu writes: > > A long time ago, I had a script that links a cd to > reset the prompt to the currently connected directory. ... > Could someone please post a copy of such an alias, please? I use the following solution: # in .profile: alias cd=c . .functs # in a separate file called ".functs": c() { cd $1; PS1="`tput smso``pwd`:`tput rmso` "; } This prints the prompt as inverse video, and gives me an entire line on which to enter long commands. (This can be handy if the cwd is long, also...) Peter