View previous topic :: View next topic |
Author |
Message |
poly_poly-man Advocate
Joined: 06 Dec 2006 Posts: 2477 Location: RIT, NY, US
|
Posted: Mon Jan 21, 2008 4:46 pm Post subject: What's your prompt? |
|
|
echo $PS1 , please!
poly-p man _________________ iVBORw0KGgoAAAANSUhEUgAAA
avatar: new version of logo - see topic 838248. Potentially still a WiP. |
|
Back to top |
|
|
runningwithscissors Guru
Joined: 21 Apr 2006 Posts: 454 Location: the third world
|
Posted: Mon Jan 21, 2008 4:54 pm Post subject: |
|
|
At a tty:
In an xterm:
|
|
Back to top |
|
|
Sadako Advocate
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Mon Jan 21, 2008 5:06 pm Post subject: |
|
|
gentoo default; Code: | \[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] | Looks like this; Quote: | hopeless@arisu ~ $ |
I end up adding it to my bash profile on none gentoo boxes too, and in cygwin too. _________________ "You have to invite me in"
Last edited by Sadako on Mon Jan 21, 2008 6:59 pm; edited 2 times in total |
|
Back to top |
|
|
kostja Apprentice
Joined: 25 May 2004 Posts: 261 Location: D, 69239 Neckarsteinach
|
Posted: Mon Jan 21, 2008 5:47 pm Post subject: |
|
|
Nice evening!
Here's mine:
Code: |
PS1=$'%D{%e %b %R}\t%(!.%{\e[1;31m%}.%{\e[1;32m%})%m %n%{\e[1;34m%}\t%d\n%{\e[0m%} (%h)%{\e[1;34m%} %# %{\e[0m%}'
|
and it looks like:
Quote: |
21 Jan 18:44 deepthought kostja /home/kostja
(3) %
|
Konstantin _________________ Registered Linux User #356484 |
|
Back to top |
|
|
luqas Guru
Joined: 02 Jan 2004 Posts: 588 Location: /US/Texas/Beaumont
|
Posted: Mon Jan 21, 2008 6:05 pm Post subject: |
|
|
Code: | PS1="\n\[\e[0;1m\]\[\016\]l\[\017\]\[\e[0;1m\](\[\e[34;1m\]\H\[\e[0;1m\])-(\[\e[34;1m\]\T\[\e[0;1m\])->\n\[\016\]m\[\017\](\[\e[34;1m\]\w\[\e[0;1m\])--> \[\e[0m\]" |
Quote: |
┌(linux)-(12:03:13)->
└(/var/tmp)-->
|
|
|
Back to top |
|
|
ocin Guru
Joined: 01 Jan 2006 Posts: 500
|
Posted: Mon Jan 21, 2008 6:41 pm Post subject: |
|
|
|
|
Back to top |
|
|
StarDragon Guru
Joined: 19 Jun 2005 Posts: 390 Location: tEXas
|
Posted: Mon Jan 21, 2008 7:01 pm Post subject: |
|
|
The default. _________________ "After all, a person's a person, no matter how small."--Horton Hears A Who! |
|
Back to top |
|
|
jonnevers Veteran
Joined: 02 Jan 2003 Posts: 1594 Location: Gentoo64 land
|
Posted: Mon Jan 21, 2008 7:15 pm Post subject: |
|
|
Quote: | username hostname ~ $ echo $PS1
\[\033[00;37m\]\u \[\033[01;34m\]`echo $HOSTNAME`\[\033[01;37m\] \[\033[00;37m\]\W\[\033[01;37m\] \$ \[\033[00m\] |
pretty basic, but it is a ton better then the green/blue default gentoo prompt... |
|
Back to top |
|
|
dforsyth n00b
Joined: 29 Jan 2005 Posts: 26 Location: College Park, Murdaland
|
Posted: Mon Jan 21, 2008 7:19 pm Post subject: |
|
|
terminal wrote: | ~ % cat .cshrc | grep 'set prompt'
set prompt = "${rgb_navy}%~ \%${rgb_restore} "
|
_________________ O
4~ <-- me, fapping to Palin.
/\ `_ |
|
Back to top |
|
|
jho Apprentice
Joined: 24 May 2007 Posts: 153 Location: Jyväskylä, Finland
|
Posted: Mon Jan 21, 2008 7:54 pm Post subject: |
|
|
Normal user:
Code: | \[\e[0;34m\w \e[1;31m>\e[0;31m>\e[0m\] |
Root:
Code: | \[\e[0;34m\w \e[1;31m>>\e[0;31m> \e[1;31m\] |
I think there's something wrong though -- If I type long lines/commands, the command sometimes overlaps the $PS1 line. Especially when working as a root. Any ideas?
I heard somewhere I need to add \[ to the beginning of $PS1, and \] to the end. I did it and it helped a bit, but it still occasionally happens. |
|
Back to top |
|
|
chrismcdirty Apprentice
Joined: 18 Jul 2003 Posts: 160 Location: Newark, DE
|
Posted: Mon Jan 21, 2008 8:03 pm Post subject: |
|
|
You need to put \[...\] around your escape codes. So do something like \[\e[0;34m\]\w \[\e[1;31m\]>\[\e[0;31m\]>\[\e[0m\] |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1931
|
Posted: Mon Jan 21, 2008 8:49 pm Post subject: |
|
|
I like gentoo default.
Even if I don't use gentoo, I get a copy of gentoo's $PS1 and use it. _________________ “And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010 |
|
Back to top |
|
|
GWilliam Guru
Joined: 29 Dec 2005 Posts: 350
|
Posted: Mon Jan 21, 2008 9:08 pm Post subject: |
|
|
#NULL
Last edited by GWilliam on Sun Jul 25, 2010 3:43 pm; edited 1 time in total |
|
Back to top |
|
|
Sadako Advocate
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Mon Jan 21, 2008 9:34 pm Post subject: |
|
|
GWilliam wrote: | Sabayon default:
Code: | \[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\] |
|
Oh my, it appears to be identical to the gentoo default.
Imagine that?
_________________ "You have to invite me in" |
|
Back to top |
|
|
Zepp Veteran
Joined: 15 Mar 2004 Posts: 1246 Location: Ontario, Canada
|
Posted: Mon Jan 21, 2008 9:35 pm Post subject: |
|
|
Ha1f wrote: | terminal wrote: | ~ % cat .cshrc | grep 'set prompt'
set prompt = "${rgb_navy}%~ \%${rgb_restore} "
|
|
Why csh? |
|
Back to top |
|
|
dforsyth n00b
Joined: 29 Jan 2005 Posts: 26 Location: College Park, Murdaland
|
Posted: Mon Jan 21, 2008 9:37 pm Post subject: |
|
|
Zepp wrote: | Ha1f wrote: | terminal wrote: | ~ % cat .cshrc | grep 'set prompt'
set prompt = "${rgb_navy}%~ \%${rgb_restore} "
|
|
Why csh? |
Dunno. I just happen to like it as a user shell. _________________ O
4~ <-- me, fapping to Palin.
/\ `_ |
|
Back to top |
|
|
SiberianSniper Guru
Joined: 06 Apr 2006 Posts: 378 Location: Dayton, OH, USA
|
Posted: Mon Jan 21, 2008 11:13 pm Post subject: |
|
|
|
|
Back to top |
|
|
tarpman Veteran
Joined: 04 Nov 2004 Posts: 1083 Location: Victoria, BC, Canada
|
Posted: Mon Jan 21, 2008 11:31 pm Post subject: |
|
|
Code: | PROMPT="%{${fg[white]}%}[%{${fg_bold[red]}%}%m%{${fg_no_bold[white]}%}] %{${fg_bold[green]}%}%1~ %{${fg[blue]}%}> %{${reset_color}%}"
[[ "$EUID" -eq 0 ]] && PROMPT="${PROMPT/\>/%#}" |
[gantrithor] ~ >
Looks better on a black background since that's what I usually have. Used to have the time instead of the hostname, but switched to hostname since I've propagated to this prompt to quite a few different machines. _________________ Saving the world, one kilobyte at a time. |
|
Back to top |
|
|
yabbadabbadont Advocate
Joined: 14 Mar 2003 Posts: 4791 Location: 2 exits past crazy
|
Posted: Mon Jan 21, 2008 11:37 pm Post subject: |
|
|
PS1='$PWD $ ' |
|
Back to top |
|
|
Ken69267 Developer
Joined: 08 Apr 2007 Posts: 111 Location: #gentoo-pr0n
|
Posted: Tue Jan 22, 2008 1:22 am Post subject: |
|
|
Code: | %{%}%n@%m%{%} %{%}%1~ %# %{%} |
ZSH, of course _________________ !snack |
|
Back to top |
|
|
tylerwylie Guru
Joined: 19 Sep 2004 Posts: 458 Location: /US/Georgia/Atlanta
|
Posted: Tue Jan 22, 2008 1:48 am Post subject: |
|
|
Code: | (19:44)[tyler:~]% echo $PS1
(\A)[\u:\w]% |
|
|
Back to top |
|
|
ksool Guru
Joined: 27 May 2006 Posts: 337 Location: Cambridge, MA
|
Posted: Tue Jan 22, 2008 2:03 am Post subject: |
|
|
koqu wrote: | Code: | PS1="\n\[\e[0;1m\]\[\016\]l\[\017\]\[\e[0;1m\](\[\e[34;1m\]\H\[\e[0;1m\])-(\[\e[34;1m\]\T\[\e[0;1m\])->\n\[\016\]m\[\017\](\[\e[34;1m\]\w\[\e[0;1m\])--> \[\e[0m\]" |
Quote: |
┌(linux)-(12:03:13)->
└(/var/tmp)-->
|
|
What's the trick to get bash to display the bracket characters (1st char of each line)? I keep getting l and m in urxvt.
EDIT: Weird. It works find in a console through agetty. Any ideas on why it won't work with urxvt (or xterm)?
Last edited by ksool on Tue Jan 22, 2008 4:55 am; edited 2 times in total |
|
Back to top |
|
|
GWilliam Guru
Joined: 29 Dec 2005 Posts: 350
|
Posted: Tue Jan 22, 2008 2:45 am Post subject: |
|
|
#NULL
Last edited by GWilliam on Sun Jul 25, 2010 3:54 pm; edited 1 time in total |
|
Back to top |
|
|
luqas Guru
Joined: 02 Jan 2004 Posts: 588 Location: /US/Texas/Beaumont
|
Posted: Tue Jan 22, 2008 4:50 am Post subject: |
|
|
ksool wrote: |
What's the trick to get bash to display the bracket characters (1st char of each line). I keep getting l and m in urxvt.
EDIT: Weird. It works find in a console through agetty. Any ideas on why it work work with urxvt (or xterm)? |
I don't know the trick to get it to work in xterm or urxvt. I know it works in aterm and xfce's terminal and the console. My xterm does the same as you and puts l and m. |
|
Back to top |
|
|
PraetorZero Apprentice
Joined: 11 Dec 2004 Posts: 239 Location: /home
|
Posted: Thu Feb 21, 2008 1:27 am Post subject: wireless signal strength? |
|
|
Does anybody know a way to add a wireless signal strength meter to the bash prompt?
I'm thinking something along the lines of Quote: | [###..] praetor@prometheus ~ $ | or Quote: | [87%] praetor@prometheus ~ $ | although the former would be preferable. |
|
Back to top |
|
|
|