Torsten Vollmann wrote: > Hi. > > Two issues with extra-prompt.sh which popped up during my work on the > alfs-profile for blfs-6.1, see: > > http://archives.linuxfromscratch.org/mail-archives/alfs-discuss/2005-September/007000.html > > > First the minor one: If my understandig of extra-prompt.sh as it is in the > book is right, the output should replace the one from $PS1, cause if both are > set to the normal values the output looks like > > [EMAIL PROTECTED]: [EMAIL PROTECTED] workdir
No, it *supplements* PS1. As the book says: "The normal variable, PS1, is supplemented by PROMPT_COMMAND. If set, the value of PROMPT_COMMAND is executed as a command prior to issuing each primary prompt." It is meant as an example. We expect users to use it or not use it as desired, but in any case, play around with it. > So I think there should be some more wording instructing to modify $PS1 in > the > bash scripts if using extra-prompt.sh unmodified. > > > Second: I think there is an error in extra-prompt.sh (Joachim Beckers and I > both checked the script installed by the profile and it is exactly the same > one as described in the book) > > the output of the script if logged in as root is ALWAYS: > > [EMAIL PROTECTED]: /root] > > It does not matter what directory you are in. If I'm not mistaken the error > is > that the values of $USER, $HOSTNAME and $PWD are filled in when the script is > run at startup and not when the prompt is written to the screen resulting in > the static output. You are right, that is an error. The single and double quotes are backward and need to be reversed. I'll fix that. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
