r4587 - in trunk/BOOK: introduction/welcome postlfs/config

bdubbs at linuxfromscratch.org bdubbs at linuxfromscratch.org
Sun Jun 12 21:01:11 PDT 2005


Author: bdubbs
Date: 2005-06-12 22:01:10 -0600 (Sun, 12 Jun 2005)
New Revision: 4587

Modified:
   trunk/BOOK/introduction/welcome/changelog.xml
   trunk/BOOK/postlfs/config/profile.xml
Log:
Fixed startup scripts; removed xterm-title.sh and added extra-prompt.sh

Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml	2005-06-13 01:36:14 UTC (rev 4586)
+++ trunk/BOOK/introduction/welcome/changelog.xml	2005-06-13 04:01:10 UTC (rev 4587)
@@ -25,6 +25,11 @@
   <itemizedlist>
 
     <listitem>
+      <para>June 12th, 2005 [bdubbs]: Corrected startup scripts.  Removed
+      xterm-title and substituted extra-prompt.sh.</para>
+    </listitem>
+
+    <listitem>
       <para>June 12th, 2005 [bdubbs]: Changed location of ispell
       dictionaries to /usr/share/ispell.</para>
     </listitem>

Modified: trunk/BOOK/postlfs/config/profile.xml
===================================================================
--- trunk/BOOK/postlfs/config/profile.xml	2005-06-13 01:36:14 UTC (rev 4586)
+++ trunk/BOOK/postlfs/config/profile.xml	2005-06-13 04:01:10 UTC (rev 4587)
@@ -313,27 +313,28 @@
 
     </sect3>
 
-    <sect3 id="titlebars.sh">
-      <title>/etc/profile.d/xterm-titlebars.sh</title>
+    <sect3 id="extra-prompt.sh">
+      <title>/etc/profile.d/extra-prompt.sh</title>
 
-      <indexterm zone="postlfs-config-profile titlebars.sh">
-        <primary sortas="e-etc-profile.d-titlebars.sh">/etc/profile.d/titlebars.sh</primary>
+      <indexterm zone="postlfs-config-profile extra-prompt.sh">
+        <primary sortas="e-etc-profile.d-prompt.sh">/etc/profile.d/extra-prompt.sh</primary>
       </indexterm>
 
-      <para>This script shows an example of a different way of setting the prompt.
-      The normal variable, <envar>PS1</envar>, is supplemented by
+      <para>This script shows an example of a different way of setting the
+      prompt.  The normal variable, <envar>PS1</envar>, is supplemented by
       <envar>PROMPT_COMMAND</envar>. If set, the value of
-      <envar>PROMPT_COMMAND</envar> is executed as a command prior to
-      issuing each primary prompt.</para>
+      <envar>PROMPT_COMMAND</envar> 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 <ulink
+      url="http://rtfm.etla.org/xterm/ctlseq.html"/></para>
 
-<screen role="root"><userinput>cat > /etc/profile.d/xterm-titlebars.sh << "EOF"
-<literal># The substring match ensures this works for "xterm" and "xterm-xfree86".
-if [ "${TERM:0:5}" = "xterm" ]; then
-  PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME} : ${PWD}\007"'
-  export PROMPT_COMMAND
-fi</literal>
+<screen role="root"><userinput>cat > /etc/profile.d/extra-prompt.sh << "EOF"
+<literal>PROMPT_COMMAND="echo -ne '\e[1m${USER}@${HOSTNAME} : ${PWD}\e[0m\a'"
+export PROMPT_COMMAND</literal>
 EOF</userinput></screen>
 
+    <para>The escape sequences above are BOLD, NORMAL, and BEL.</para>
+
     </sect3>
 
     <sect3 id="i18n.sh">
@@ -436,10 +437,6 @@
   source /etc/profile.d/tinker-term.sh
 fi
 
-if [ -f /etc/profile.d/xterm-titlebars.sh ]; then
-  source /etc/profile.d/xterm-titlebars.sh
-fi
-
 # System wide aliases and functions.
 
 # System wide environment variables and startup programs should go into




More information about the blfs-book mailing list