DSL Ideas and Suggestions :: Change $PS1

First of all, you may ask what is $PS1 - it is the primary prompt that you see in a terminal, such as:

Then you may ask why would I want to change that (what is pretty much standard everywhere).  When you want to copy something from the prompt in an X terminal emulator, it would, for example, select more than just the path when you double click on it.  Double clicking is easier and faster than highlighting the whole thing or running `pwd`, etc.

Currently 4.x(?) has dsl@box:/mydir$ for user dsl.
Root's is a blue [/mydir]# which does allow you to double click.

dslcore has dsl@box:/mydir$ for user dsl and root has root@box:/mydir#
Perhaps the root prompt should be in color like in previous versions?
I know this isn't the dslcore section, but this post applies to the current series as well.

I set PS1 in .bashrc to override the default for my interactive shells (or .profile for ash I suppose).  I use something like "dsl@box /mydir>$" at the moment.  Are there any actual set standard on how this should be?

I wonder if others will have a use for this.

It's the first thing people used to customize in their Linux systems :)
Mine looks like

ti 22. heinäkuuta 2008 22:06:58, celebear kansiossa ~ :P

With date on yellow and everything after the comma in green.

I also use .bashrc for this, inside the "if $PS1" block.  I used to cat an external file, which made it easy to program a change when changing my desktop theme, but that was dropped when I dropped the whole idea of desktop themes.

PS1="\[\033[0;37m\]( o_\n/ >) [\w]\[\033[0m\]\n"
looks like
Code Sample
( o_
/ >) [~]

I've got root's PS1 set in root's .bashrc:
[ -n "$TTY" ] && PS1="\[^[[1;34m\]\w@$TTY[\W]#\[^[[0;39m\] " || PS1="\[^[[1;34m\][\w]#\[^[[0;39m\] "
Honestly can't remember if this behaves the way I had originally planned, considering I don't remember doing this =o)

on OSx:
PS1='\u@\h:\w '
chaostic@OSX:~ cd Desktop/

On DSLcore, the standard prompt for now.

on DSL 3/4, I mostly use ssh, so the standard prompts for user or root are used unless I ssh'd in. Then it gets colored, and shows the hostname of the incoming ssh connection:
Code Sample

# SSHHOST shows the arp table, grepping it for the line with the ip address you are shhing from in, then cuts the hostname out
[ -n "$SSH_CLIENT" ] && SSHHOST=$(arp -a | grep `echo $SSH_CLIENT|cut -f1 -d\ ` | cut -f1 -d\ )

# Creating command prompt, using SSHHOST to add dynamic host name to prompt if SSHing in
# PS1 = [Cyan/Underlined](Host where you are SSHing from)[No Color][Blue](SHHing through)[Light Red/Bold](User AT host:PWD)(Space)[No Color]
[ -n "$SSHHOST" ] && PS1=$'\\[\E[36;0;4m\\]$SSHHOST\\[\E[0m\\]\\[\E[36;0m\\]*\\[\E[31;1m\\]\\u@\\h:\\w \\[\E[0m\\]'

OSX*dsl@box:~ cd /var/tmp

OSx would be underlined and blue, * would be blue, and dsl@box:~ would be light red.

I didn't make one for root yet (Don't really spend much time as root, so the plain jane prompt is warning enough)

curaga: you have that smiley on the end as well? j/k :P  I did include some date details before, but I found that (at least on the systems I work on) that there was a permanent section for that already.

mikshaw: I was really wondering why it looked like such an odd prompt, until I tried it in a terminal and found out it was tux!

chaostic: very similar to the defaults but interesting use of the remote session.  I was looking for something that would separate during selection though.

In addition, booting in 4.x into user text-mode gives an aqua PS1 of "dsl@tty1[currentdirectorybasename]$", and similarily for root.

That brings me to (change) my question: would it be worth it to push for a default change in DSL to something that would allow "easy double-clicking" or should it be left alone since it seems everyone (who wants something like that, or more) customizes their own prompt anyways?

Next Page...
original here.