old-www/HOWTO/Bash-Prompt-HOWTO/x643.html

191 lines
3.0 KiB
HTML

<HTML
><HEAD
><TITLE
>Loading a Different Prompt, Later</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="Bash Prompt HOWTO"
HREF="index.html"><LINK
REL="UP"
TITLE="Loading a Different Prompt"
HREF="c641.html"><LINK
REL="PREVIOUS"
TITLE="Loading a Different Prompt"
HREF="c641.html"><LINK
REL="NEXT"
TITLE="Loading a Different Prompt, Immediately"
HREF="x655.html"></HEAD
><BODY
CLASS="SECT1"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>Bash Prompt HOWTO: </TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="c641.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Chapter 9. Loading a Different Prompt</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x655.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="AEN643"
></A
>9.1. Loading a Different Prompt, Later</H1
><P
>The explanations in this HOWTO have shown how to make PS1 environment
variables, or how to incorporate those PS1 and PS2 strings into functions
that could be called by ~/.bashrc or as a theme by the bashprompt
package.</P
><P
>Using the bashprompt package, you would type <TT
CLASS="USERINPUT"
><B
>bashprompt
-i</B
></TT
> to see a list of available themes. To set the prompt in
future login shells (primarily the console, but also telnet and Xterms,
depending on how your Xterms are set up), you would type
<TT
CLASS="USERINPUT"
><B
>bashprompt -l themename</B
></TT
>.
<B
CLASS="COMMAND"
>bashprompt</B
> then modifies your
<TT
CLASS="FILENAME"
>~/.bash_profile</TT
> to call the requested theme when
it starts. To set the prompt in future subshells (usually Xterms, rxvt,
etc.), you type <TT
CLASS="USERINPUT"
><B
>bashprompt -s themename</B
></TT
>, and
bashprompt modifies your <TT
CLASS="FILENAME"
>~/.bashrc</TT
> file to call
the appropriate theme at startup. &#13;</P
><P
>See also <A
HREF="setps.html"
>Section 2.6</A
> for
Johan Kullstam's note regarding the importance of putting the PS?
strings in ~/.bashrc .</P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="c641.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x655.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Loading a Different Prompt</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c641.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Loading a Different Prompt, Immediately</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>