Archaic wrote:
> On Wed, Oct 19, 2005 at 10:00:53PM -0500, Bruce Dubbs wrote:
> 
>>The PROMPT_COMMAND is in the book.  Look under  "The Bash Shell Startup
>>Files" in Chapter 3.  If you want to expand the description, feel free.
> 
> 
> What is being referred to is the conditional statement that wraps it. A
> couple of people have reported that the book is broken in that it
> applies the VAR to consoles as well.

What it says:

"This script shows an example of a different way of setting the prompt.
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. The sequence \e is an ESC character. \a is a BEL
character. For a reference on xterm escape sequences, see
http://rtfm.etla.org/xterm/ctlseq.html.

cat > /etc/profile.d/extra-prompt.sh << "EOF"
PROMPT_COMMAND='echo -ne "[EMAIL PROTECTED] : ${PWD}\e[0m\a"'
export PROMPT_COMMAND
EOF

The escape sequences above are BOLD, NORMAL, and BEL."


It is meant to be an *example*, not blindly used.  If you have a
specific suggestion on how to change the wording or the example, let's
discuss it more.

  -- Bruce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to