> I've tried about fifteen ways to get the prompt to look like this: > > [root@firewall /usr/sbin]# <--- where "/usr/sbin" is a current working directory to no avail. The best I ever get is "/root", which was the value of $PWD (or output of `pwd`) at the time that the PS1 was exported. The following line is what I want: > > echo -n -e "\n[$USER@$HOSTNAME `/bin/pwd`]# " > > At least, it works from the shell, just not within the construct of an exported variable. The embedded command always gets parsed upon export of the variable rather than when the variable is called. Any thoughts? If not, has anyone compiled a bash package for Bering or another LEAF variant? Thanks, again!
If you're running ash (the default), it does *NO* dynamic processing on the PS1 & PS2 variables, so you can't (easily) get things like the PWD to display as part of the prompt. You can either upgrade to a shell which does support this sort of processing of the prompt variables, or "cheat", and do it yourself with ash. To get PWD as part of the prompt in ash, you have to "intercept" the cd command (and other commands that might change your directory)...details are available in the SF FAQ-o-matic: http://sourceforge.net/docman/display_doc.php?docid=5178&group_id=13751 Charles Steinkuehler http://lrp.steinkuehler.net http://c0wz.steinkuehler.net (lrp.c0wz.com mirror) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Bringing you mounds of caffeinated joy. http://thinkgeek.com/sf ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
