Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Compartamos nuestra variable PS1 (OT)
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Spanish
View previous topic :: View next topic  
Author Message
nunus
n00b
n00b


Joined: 12 Oct 2005
Posts: 9

PostPosted: Tue Apr 11, 2006 3:45 am    Post subject: Compartamos nuestra variable PS1 (OT) Reply with quote

Yo empiezo

Code:
PS1='\[\033[01;32m\]\u\[\033[01;33m\]-æ-\[\033[01;31m\]\h\[\033[01;33m\] \w\[\033[01;37m\] \$ » '


se animan? :)
Back to top
View user's profile Send private message
Tambor
n00b
n00b


Joined: 07 Apr 2005
Posts: 53
Location: Girona (CAT)

PostPosted: Tue Apr 11, 2006 10:25 am    Post subject: Reply with quote

Code:
\[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]
Back to top
View user's profile Send private message
LinuxBlues
l33t
l33t


Joined: 26 Mar 2005
Posts: 892

PostPosted: Tue Apr 11, 2006 11:32 am    Post subject: Reply with quote

Code:
info bash

/Printing a Prompt

para ver todos los detalles :wink:
Back to top
View user's profile Send private message
tomk
Administrator
Administrator


Joined: 23 Sep 2003
Posts: 7219
Location: Sat in front of my computer

PostPosted: Tue Apr 11, 2006 11:48 am    Post subject: Reply with quote

$PS1:
$(date +%H:%M) \[\033[01;32m\]\u@\h \[\033[01;34m\]\W \$ \[\033[00m\]


Y en ordenadores donde tengo que tener más precuación:

$PS1:
$(date +%H:%M) \[\033[01;32m\]\u@\[\033[1;31m\]\h \[\033[01;34m\]\W \$ \[\033[00m\]

_________________
Search | Read | Answer | Report | Strip
Back to top
View user's profile Send private message
g0su
Guru
Guru


Joined: 14 May 2003
Posts: 437
Location: Dresden, Deutschland

PostPosted: Tue Apr 11, 2006 8:21 pm    Post subject: Reply with quote

Tomk gracias por lo de date.

Yo segui esta guia, que me parece muy interesante: http://www.zonasiete.org/manual/ch10s02.html

Y despues de añadir la fecha, me ha quedado algo asi:
PS1="\[\033[1;31m\]$(date +%H:%M) \[\033[1;32m\]\u@\[\033[1;33m\]\h\[\033[1;34m\] [\w] \$\[\033[0m\]"


22:21 moxilo@DarkTemplar [/usr/portage] $

Roja la fecha, verde el usuario, amarillo el host y azul el directorio xD.

Un saludo!
Back to top
View user's profile Send private message
navegante
l33t
l33t


Joined: 21 Jul 2004
Posts: 702

PostPosted: Tue Apr 11, 2006 10:45 pm    Post subject: Reply with quote

Quote:
22:21 moxilo@DarkTemplar [/usr/portage] $

Roja la fecha, verde el usuario, amarillo el host y azul el directorio xD.

22:21 moxilo@DarkTemplar [/usr/portage] $ :P

Yo no he cambiado nada:
Code:
\[\033[01;32m\]\u@\h \[\033[01;34m\]\w \$ \[\033[00m\]

_________________
"El hombre es libre desde que nace, aún para decidir no ser libre"
KDE registered user: #2655 | Linux registered user: #404918
Back to top
View user's profile Send private message
alexlm78
Veteran
Veteran


Joined: 08 Dec 2003
Posts: 1265
Location: Guatemala,Guatemala

PostPosted: Wed Apr 12, 2006 3:54 pm    Post subject: Reply with quote

El mio esta asi:

Code:
\[\033[01;33m\]$LEGEND\n\[\033[00;36m\][\t] \[\033[01;32m\]\u@\h \[\033[01;34m\]\W $ \[\033[00m\]


Donde $LEGEND es un mensaje que cambia cada cierto tiempo. el actual 12/04/2006

"Los pueblos no deben temer a sus gobiernos, los gobiernos deben temer a sus pueblos." { V }
[09:45:34] alex@Eowyn ~ $

Saluditos.
_________________
"This is a different kind of world, you need a different kind of software"

Linux User# 315201
www.alexlm78.org
www.dcforfans.org
100% Chapin hecho en Guatemala
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3705

PostPosted: Wed Apr 12, 2006 4:52 pm    Post subject: Reply with quote

ahi va el mio :

Code:
PS1="\n\[\e[30;1m\]\[\016\]\[\017\](\[\e[34;1m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'):\[\e[30;1m\])-(\[\e[34;1m\]\u@\h\[\e[30;1m\])-(\[\e[34;1m\]\!,\#\e[30;1m\])-(\[\e[34;1m\]\j\[\e[30;1m\])-(\[\e[34;1m\] \@\[\e[30;1m\])\[\e[30;1m\]\n(\[\[\e[32;1m\]\$(pwd | sed 's=^\(.\{5\}\)\(.*\)\(.\{10\}\)$=\1...\2...\3=' | sed 's=\.\.\.\.\.\.==' | sed 's=\(.*\)\.\.\..*\.\.\.\(.*\)=\1...\2=')\[\e[30;1m\])-(\[\e[32;1m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g'):\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\e[30;1m\])-->\[\e[0m\]"


que viene siendo algo como:

(pts/0)-(root@trasto)-(501,1)-(0)-( 06:56 )
(/rack)-(31:21Gb)-->

(terminal)-(usuario@máquina)-(total comandos en historial,total comandos ejecutados en ésta sesión)-(jobs)-(hora)
(PWD con un tope de 20 caracteres)-(número de elementos en PWD:tamaño de PWD)

saluetes
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Spanish All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum