Your system's default prompt might be just a dollar sign ($) or perhaps a dollar sign and date, or other information as outlined in the Set your csh prompt promptly sidebar. You can change this prompt using the following steps. You start by finding your prompt statement (Code Listing 8.16), then modify it in your editor (Figure 8.6).
To change your csh prompt:
1. | grep path ~/.cshrc ~/.login To begin, list the configuration files located in your home directory and in the /etc directory. Look through your system configuration files for your prompt statement. It'll look something like set prompt="> " or set prompt=" `hostname`> ". It's likely in your .cshrc file, as shown in Code Listing 8.16. The Setting your csh prompt promptly sidebar will help you translate this code. Code Listing 8.17. Test out your new prompt to see if you like it.
| |
2. | vi .cshrc Use the editor of your choice to edit the configuration file with the prompt setting in it. | |
3. | set prompt="$LOGNAME > " Set your prompt to something more suitable, as shown in Figure 8.6. Figure 8.6. Edit your prompt to include the details you want.
| |
4. |
Save the file and exit from the editor. | |
5. |
Note
Note the trailing space in the prompt code: set prompt="$LOGNAME > ". This extra space makes the prompt easier to use.
Setting your csh prompt promptlyYou can set your csh prompt to contain some types of information, but not as many as the bash or ksh prompts. The following list shows you what code to use to add certain kinds of information to your prompt (as well as helping you translate the code in your existing prompt):
Or, use any other environment variables of your choice. |
xmission> alias cd cd !*;echo $cwd clr clear cls clear copy cp -i del rm -i delete rm -i dir ls -alg home cd ~ ls ls -F md mkdir move mv -i pwd echo $cwd type more xmission> |
18.223.213.238