View previous topic :: View next topic |
Author |
Message |
nunus n00b
Joined: 12 Oct 2005 Posts: 9
|
Posted: Tue Apr 11, 2006 3:45 am Post subject: Compartamos nuestra variable PS1 (OT) |
|
|
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 |
|
|
Tambor n00b
Joined: 07 Apr 2005 Posts: 53 Location: Girona (CAT)
|
Posted: Tue Apr 11, 2006 10:25 am Post subject: |
|
|
Code: | \[\033[01;32m\]\u@\h\[\033[01;34m\] \w \$\[\033[00m\]
|
|
|
Back to top |
|
|
LinuxBlues l33t
Joined: 26 Mar 2005 Posts: 892
|
Posted: Tue Apr 11, 2006 11:32 am Post subject: |
|
|
/Printing a Prompt
para ver todos los detalles |
|
Back to top |
|
|
tomk Bodhisattva
Joined: 23 Sep 2003 Posts: 7221 Location: Sat in front of my computer
|
Posted: Tue Apr 11, 2006 11:48 am Post subject: |
|
|
$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 |
|
|
g0su Guru
Joined: 14 May 2003 Posts: 437 Location: Dresden, Deutschland
|
Posted: Tue Apr 11, 2006 8:21 pm Post subject: |
|
|
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 |
|
|
navegante l33t
Joined: 21 Jul 2004 Posts: 702
|
Posted: Tue Apr 11, 2006 10:45 pm Post subject: |
|
|
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] $
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 |
|
|
alexlm78 Veteran
Joined: 08 Dec 2003 Posts: 1265 Location: Guatemala,Guatemala
|
Posted: Wed Apr 12, 2006 3:54 pm Post subject: |
|
|
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
100% Chapin hecho en Guatemala |
|
Back to top |
|
|
gringo Advocate
Joined: 27 Apr 2003 Posts: 3793
|
Posted: Wed Apr 12, 2006 4:52 pm Post subject: |
|
|
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 |
|
|
|