The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
[ HOME | TOPICS | INDEX | WEB RESOURCES | BOOKS | CONTRIBUTE | SEARCH | FEEDBACK | FAQ | FORUMS ]
Article Feedback - mounting an ISO image
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Previous Message  |  Next Message 
 Making the prompt more visible for root
Author: Aled Treharne 
Date:   29-12-03 11:07

I've set a little script up in /etc/csh.cshrc which is the global file that controls all users. It can be overridden by the user's own .cshrc or .tcshrc.

The script itself sets up a prompt with my name, hostname, path (using ~ instead of your home directory where appropriate), the current time and the > or # prompt depending on whether you're root or not. What I did was to make the script set the user@hostname bold if you're root:


#Set the prompt for all users, only make it bolder for root
if ($uid == 0) then
set prompt="%B[root@%m]%b%~ %T %# "
else
set prompt="[%n@%m]%~ %T %# "
endif

Cheers,
Aled.



 Reply To This Message  |  Forum List  |  Flat View   Newer Topic  |  Older Topic 

 Topics Author  Date
 Making the prompt more visible for root   new
Aled Treharne 29-12-03 11:07 


 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Password:
 Remember my login:
   
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum

phorum.org