Copyright (C) 2000-2012 |
Whole document tree Chapter 5. Saving Complex PromptsAs the prompts you use become more complex, it becomes more and more cumbersome to type them in at the prompt, and more practical to make them into some sort of text file. I have adopted the method used by the Bashprompt package (discussed later in this document: Chapter 8), which is to put the primary commands for the prompt in one file with the PS1 string in particular defined within a function of the same name as the file itself. It's not the only way to do it, but it works well. Take the following example:
You can work with it as follows:
|