Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!news From: AGRISCS@umcvmb.missouri.edu (Don Ingli) Newsgroups: comp.unix.wizards Subject: RE: pwd in your PS1 Message-ID: <21894@adm.BRL.MIL> Date: 29 Dec 89 01:22:30 GMT Sender: news@adm.BRL.MIL Lines: 49 I have developed a method to put your pwd into your ps1. The way I do it is to create a shell function in my .profile and then have it run a program called chd . place this in your .profile chd() { . chd } PS1="$LOGNAME:`pwd`> " export PS1 this creates a function chd that will run a script called chd and affect the current environment.... now create this shell script: and name it chd cd $* PS1="$LOGNAME:`pwd`> " export PS1 remember to place it in a subdirectory that is in your $PATH var. Also, make sure you have executable permissions chmod 700 chd :-) HINT: If you have a nosey co-worker/friend use chd to display a path and then use cd to go where you want... cd wont change your prompt. ex: chd project don:/usr8/don/project> cd /usr/games your prompt will show you that you are in subdir project but actually be in the games directory!! Also... chd with no args will take you to your HOME directory since it calls cd... Hope this helps... DON INGLI------------------------------------------------------------+ UNITED STATES DEPARTMENT OF AGRICULTURE - SOIL CONSERVATION SERVICE | bitnet: agriscs@umcvmb.bitnet internet: agriscs@umcvmb.missouri.edu | attmail: attmail!attbl!arpa!umcvmb.missouri.edu!agriscs | ALL OPINIONS IN THIS NOTE ARE OF MY OWN AND DO NOT REPRESENT THE | FEDERAL GOVERNMENT OR THE UNIVERSITY OF MISSOURI-COLUMBIA -----------+