LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   What does your shell prompt look like? (https://www.linuxquestions.org/questions/linux-general-1/what-does-your-shell-prompt-look-like-115354/)

pibby 11-17-2003 12:20 AM

Thanks for the help, I didnt realize that I could type anything in there, thought it had to be something like /h or /w. Thanks again :)

frieza 11-17-2003 02:19 AM

i use the default as well, but i have experimented with a few
C:$PWD>
for instance (not much of a fooler because of the slashes instead of backslashes but still kinda funny)

slakmagik 11-17-2003 06:24 AM

You're an evil person, frieza. :D It took me awhile to figure out and it's definitely not thoroughly tested, but it seems to work - I had a hard time going about it the wrong way. I set it pretty easily but couldn't get it to persist through 'cd' commands until I completely rethought it.

Try this Fake Working Directory in your ~/.bashrc or wherever. Very funny. *g*
Code:

PS1="C:\$(fwd)>"

function fwd () {
echo $PWD | sed 's/\//\\/g' | tr [:lower:] [:upper:]
}


a slacker 11-17-2003 06:55 AM

bash-2.05b$

DarkSpy 11-18-2003 01:52 PM

Code:

(19:51)[darkspy@Orion darkspy]$ cd Downloads/
(19:51)[darkspy@Orion Downloads]$ echo $PS1
($(date +%H:%M))[\u@\h \W]$
(19:51)[darkspy@Orion Downloads]$


Sammy2ooo 11-28-2003 03:52 AM

this is what my bash prompt looks like:

echo $PS1

Code:

\[\033[0m\]\[\033[1;33m\]\j\[\033[0m\]\[\033[1;30m\]\t\[\033[0m\]\[\033[31m\]\u\[\033[0m\]@\[\033[1;34m\]\033[37m\]\w$\[\033[0m\]

TheOneKEA 11-28-2003 06:25 AM

export PS1="[\u@\h \W]$ "
for normal users

export PS1="[\u@\h \W]# "
for root

[theonekea@Ganymede theonekea]$

But I may change it, after seeing the stuff in this thread.

synaptical 11-29-2003 12:29 AM

mine's also pretty basic:
PS1='\[\e[36;1m\]\u@\h:\[\e[34;1m\]\w \$\[\e[0m\]'
PS2=~>

i wanted to add the current directory to the title bar instead, to save space, but it messes things up when in console mode. :(

fatgod 11-29-2003 07:52 AM

< /usr/local/games >
[ Sat Nov 29 ¤ 13:34:11 --- fatgod @ odin ]
$ echo $PS1
\n\033[1;33m\] < \w >\n\033[1;32m\][ \d \244 \t --- \u @ \H ]\n \033[1;37m\]$


Which is virtually impossible to see on a light background... but works well enough on darkened tranparent windows. And when I 'su' the username turns red.

dkaplowitz 11-29-2003 07:59 AM

$

320mb 10-17-2004 04:05 PM

I make it easy on myself, at the top I define the colors I use.........
Code:

# Color Variables for Prompt
GRAD1='\333\262\261\260'
GRAD2='\260\261\262\333'
YLOBRN='\[\033[01;33;43m\]'
WHTBRN='\[\033[01;37;43m\]'
REDBRN='\[\033[01;31;43m\]'
BLUBRN='\[\033[01;34;43m\]'
GRNBRN='\[\033[00;32;43m\]'
REDBLK='\[\033[00;31;40m\]'
PPLBLK='\[\033[01;35;40m\]'
WHTBLK='\[\033[01;37;40m\]'
NONE='\[\033[00m\]'
HBLK='\[\033[00;30;30m\]'
HBLU='\[\033[01;34;34m\]'

BLU='\[\033[01;34m\]'
YEL='\[\033[01;33m\]'
WHT='\[\033[01;37m\]'
PRPL='\[\033[00;35m\]'
RED='\[\033[01;31m\]'
GRN='\[\033[01;32m\]'         
GRAY='\[\033[01;30m\]'
PINK='\[\033[01;35m\]'
NORM='\[\033[01;00;0m\]'
CYAN='\[\033[01;36m\]'


export GRAD1 GRAD2 YLOBRN WHTBRN REDBRN BLUBRN GRNBRN
REDBLK PPLBLK WHTBLK NONE HBLK HBLU BLU YEL WHT PRPL
RED GRN GRAY PINK NORM CYAN

my user prompt is this:
Code:

PS1="$GRN\h  $RED\w $YEL\$  $NONE$NORM"
Hence:
Chessmaster ~ $

When I'm root: Chessmaster is Red and the working directory is Green

oneandoneis2 10-17-2004 04:35 PM

I have a fairly bland command prompt. The only thing that I really like to have is a \n at the front, which puts a blank line between the last output and the new prompt

Bruce Hill 10-17-2004 05:47 PM

Glad you guys resurrected this thread. I searched for it a couple of
months ago but could not find it no matter what string I entered...

320mb 10-17-2004 06:34 PM

Quote:

Originally posted by Chinaman
Glad you guys resurrected this thread. I searched for it a couple of
months ago but could not find it no matter what string I entered...

I found it by accident.........I was searching for some info on /etc/profile.d
and came upon it...............hopefully it won't go dead again for awhile...........

SocialEngineer 10-17-2004 07:11 PM

[19:11:21][will@hexbox1lnx]$

PS1="[\t][\u@\h\\$ "


All times are GMT -5. The time now is 11:45 AM.