unix PS1

Thread Solved

Join Date: Sep 2007
Posts: 28
Reputation: axn is an unknown quantity at this point 
Solved Threads: 0
axn axn is offline Offline
Light Poster

unix PS1

 
0
  #1
May 20th, 2009
I have setup in .profile my login prompt as:
PS1='${HOSTNAME}/${PWD}>

how do I get the prompt to highlight so everytime i log in i see
whatever i set my PS1 to highlighted.?
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 113
Reputation: cfajohnson is an unknown quantity at this point 
Solved Threads: 15
cfajohnson cfajohnson is offline Offline
Junior Poster

Re: unix PS1

 
0
  #2
May 24th, 2009
Originally Posted by axn View Post
I have setup in .profile my login prompt as:
PS1='${HOSTNAME}/${PWD}>

how do I get the prompt to highlight so everytime i log in i see
whatever i set my PS1 to highlighted.?

What shell are you using?

In bash:

PS1='\[\e[[7m\]${HOSTNAME}/${PWD}\[\e[0m\]'

Adjust the 7 to whatever you want, e.g., 1;31 or 1;37;40m.
Last edited by cfajohnson; May 24th, 2009 at 4:49 am.
Chris F.A. Johnson
http://cfajohnson.com
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 28
Reputation: axn is an unknown quantity at this point 
Solved Threads: 0
axn axn is offline Offline
Light Poster

Re: unix PS1

 
0
  #3
May 26th, 2009
Ok much thanks, i got the idea for K-shell
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the *nix Software Forum


Views: 1122 | Replies: 2
Thread Tools Search this Thread



Tag cloud for *nix Software
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC