General TC > General TC Talk
Prompt
TomyTurbos:
I feel like a total newb asking this...
What I want is my prompt to be as follows:
(user)@(host)[color][maybe date and time here?]
(current-directory)[different-color]
{type-stuff-here[different-color]} <--this is the cursor behavior.
The newlines are significant.
I'm looking but not finding a succinct answer for how this might be done.
'(current-directory)' should be explicit path name for PWD.
TIA.
TomyTurbos:
Here's an example of what I mean:
foo@bar 25:61 02/30/3147
/home/foo
{cursor}
Rich:
Hi TomyTurbos
Try this in a terminal:
--- Code: ---export PS1='\u@\h:${YELLOW}$(date "+%a %b %d %T") ${RED}$PWD\$${GREEN} '
--- End code ---
Alter the PS1 variable in your .profile file to make it permanent.
Rich:
Hi TomyTurbos
The above example was derived from these threads:
http://forum.tinycorelinux.net/index.php/topic,10429.msg55808.html#msg55808
http://forum.tinycorelinux.net/index.php/topic,3281.msg17139.html#msg17139
Here's an example that modifies the title bar of a terminal so it dynamically lists the current directory:
http://forum.tinycorelinux.net/index.php/topic,274.msg1657.html#msg1657
and a link from that thread that may be useful:
http://www.faqs.org/docs/Linux-mini/Xterm-Title.html
TomyTurbos:
Thanks for all that, rich. I'll get back to you after school...
Navigation
[0] Message Index
[#] Next page
Go to full version