Bash Prompt HOWTO

Next Previous Contents v0.76 31 December 1999

Creating and controlling terminal and xterm prompts is discussed, including incorporating standard escape sequences to give username, current working directory, time, etc. Further suggestions are made on how to modify xterm title bars, use external functions to provide prompt information, and how to use ANSI colours.

1. Introduction and Administrivia

2. Bash and Bash Prompts

3. Bash Programming and Shell Scripts

4. External Commands

5. Xterm Title Bar Manipulations

6. ANSI Escape Sequences: Colours and Cursor Movement

  • 6.1 Colours
  • 6.2 Cursor Movement
  • 6.3 Moving the Cursor With tput

7. Special Characters: Octal Escape Sequences

8. The Bash Prompt Package

  • 8.1 Availability
  • 8.2 Xterm Fonts
  • 8.3 Changing the Xterm Font

9. Loading a Different Prompt

10. Loading Prompt Colours Dynamically

  • 10.1 A « Proof of Concept » Example

11. Prompt Code Snippets

12. Example Prompts

Next Previous Contents

READ  Interview with Ronnie Ko of 32BitsOnline LG #55