Update your shell prompt
If you use the shell in Linux, Unix, the Mac, or any other *nix system, you really owe it to yourself to update the command line prompt. The default prompt is nearly worthless, and there are a lot of options available for making it better.
This article (http://www.ibm.com/developerworks/linux/library/l-tip-prompt/) provides a good primer on how to get started.
For me, I like to see my path in the prompt. But when I am in my root directory, I don't care about the full path, I only care about the part of the path under my root directory. If you want to give this a try, here's how to set your PS1 parameter:
where your replace rootDirName with the name of your root directory. For example, if the path to your root directory is: /users/tomp, you would replace rootDirName with tomp. Give it a try, I bet you'll like it better than the default prompt.
This article (http://www.ibm.com/developerworks/linux/library/l-tip-prompt/) provides a good primer on how to get started.
For me, I like to see my path in the prompt. But when I am in my root directory, I don't care about the full path, I only care about the part of the path under my root directory. If you want to give this a try, here's how to set your PS1 parameter:
PS1='${PWD##*rootDirName/}: '
where your replace rootDirName with the name of your root directory. For example, if the path to your root directory is: /users/tomp, you would replace rootDirName with tomp. Give it a try, I bet you'll like it better than the default prompt.
| Link: | www.ibm.com...Search for more tips related to this link |
| Rating: | no ratings, 0 total Votes |
| Categories: | UNIX Mac linux shell |
| Added: | on Jun 04, 2007 at 9:15 pm |
| Added By: | an anonymous user |

