Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.

neka lepa "boja" za $PS1

[es] :: Linux :: neka lepa "boja" za $PS1

[ Pregleda: 5046 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Autor

Pretraga teme: Traži
Markiranje Štampanje RSS

rastaman
Stantic Vladimir
Subotica

Član broj: 383
Poruke: 97
213.255.225.*

ICQ: 58896431


Profil

icon neka lepa "boja" za $PS122.09.2003. u 15:29 - pre 249 meseci
ima li neko predlog neke dobre sheme za $PS1
ja trenutno koristim $PS1='\e[0;32m\]\u\e[1;33m\]@\h\e[0;31m\]:\w\e[0m\]# '
sve u stilu reggae-a ;pppp
dajte neke dobre predloge, bas bi nesto novo da stavim
Open your mind...think Open Source
 
Odgovor na temu

stinger
Luka Gerzic
DELTA M, IT Department
DELTA M HQ

Član broj: 126
Poruke: 1099
*.drenik.net

ICQ: 57419599
Sajt: www.gerzic.net


Profil

icon Re: neka lepa "boja" za $PS122.09.2003. u 20:36 - pre 249 meseci
nisam zvezdas ali ova kombinacija mi odgovara :)

PS1='\e[1;31m\]\u\e[1;37m\]@\h\e[0;37m\]:\w\e[0m\]# '

za one koji bi da se igraju sa bojama:

Code:

        [0;31m tamno crvena
        [1;31m svetlo crvena
        [0;32m tamno zelena
        [1;32m svetlo zelena
        [0;33m tamno zuta
        [1;33m svetlo zuta
        [0;34m tamno plava
        [1;34m svetlo plava
        [0;35m tamno ljubicasta
        [1;35m svetlo ljubicasta
        [0;36m tamno cijan
        [1;36m svetlo cijan
        [0;37m tamno siva
        [1;37m bela
        [0;37m crna

 
Odgovor na temu

tOwk
Danilo Šegan
Zemun/Beograd

Član broj: 94
Poruke: 2743
*.verat.net

ICQ: 9344053
Sajt: alas.matf.bg.ac.yu/~mm011..


+2 Profil

icon Re: neka lepa "boja" za $PS123.09.2003. u 13:57 - pre 249 meseci
Citat:
stinger:
PS1='\e[1;31m\]\u\e[1;37m\]@\h\e[0;37m\]:\w\e[0m\]#'

A i voliš da se osećaš kao root i kad si „običan“ korisnik, a? :-P

Evo ga i moj :-)

\[\033[1;30m\]$(date "+%A, %H:%M") : \[\033[0;31m\]\u@\h : \w\n\$\[\033[0m\]

PS. Jedan savet za sve, ako koristite bash, onda „neispisive“ znake stavite između \[ i \], kako bi vam brisanje lepo radilo (da ne počnete da brišete prompt).
Možda se moje mišljenje promenilo, ali ne i činjenica da sam u pravu.
 
Odgovor na temu

stinger
Luka Gerzic
DELTA M, IT Department
DELTA M HQ

Član broj: 126
Poruke: 1099
*.drenik.net

ICQ: 57419599
Sajt: www.gerzic.net


Profil

icon Re: neka lepa "boja" za $PS123.09.2003. u 15:49 - pre 249 meseci
Citat:
tOwk:
A i voliš da se osećaš kao root i kad si „običan“ korisnik, a? :-P


mjok, na masini na kojoj sam probao PS bio sam suovan na root-a pa je # ostao,
umesto $ ;) morao si da 'zacnes' zar ne? :)

Citat:
tOwk:
\[\033[1;30m\]$(date "+%A, %H:%M") : \[\033[0;31m\]\u@\h : \w\n\$\[\033[0m\]


mogao si to i elegantnije PS1='\d, \A :: \w\n\u@\h$ '
nema potrebe da koristis date ;) A bojadisanje cu da ostavim za sladokusce ;)
vrlo lep i koristan prompt, do sad nisam obracao paznju na to, medjutim ova tvoja varijanta je gotivna :)

evo i liste iz man bash, da se drugi ne muche trazeci istu ;)

Code:

              \a     an ASCII bell character (07)
              \d     the date in "Weekday Month Date" format (e.g., "Tue May 26")
              \D{format} the  format is passed to strftime(3) and the result is
                 inserted into the prompt string; an empty format results in
                 a locale-specific time representation.  The braces are required
              \e     an ASCII escape character (033)
              \h     the hostname up to the first `.'
              \H     the hostname
              \j     the number of jobs currently managed by the shell
              \l     the basename of the shell's terminal device name
              \n     newline
              \r     carriage return
              \s     the name of the shell, the basename of $0 (the portion 
                      following the final slash)
              \t     the current time in 24-hour HH:MM:SS format
              \T     the current time in 12-hour HH:MM:SS format
              \@     the current time in 12-hour am/pm format
              \A     the current time in 24-hour HH:MM format
              \u     the username of the current user
              \v     the version of bash (e.g., 2.00)
              \V     the release of bash, version + patchelvel (e.g., 2.00.0)
              \w     the current working directory
              \W     the basename of the current working directory
              \!     the history number of this command
              \#     the command number of this command
              \$     if the effective UID is 0, a #, otherwise a $
              \nnn   the character corresponding to the octal number nnn
              \\     a backslash
              \[     begin a sequence of non-printing characters, which could
                     be used to embed a terminal  control  sequence  into  the prompt
              \]     end a sequence of non-printing characters



 
Odgovor na temu

rastaman
Stantic Vladimir
Subotica

Član broj: 383
Poruke: 97
217.26.75.*

ICQ: 58896431


Profil

icon Re: neka lepa "boja" za $PS124.09.2003. u 00:41 - pre 249 meseci
da steta sto to sa datumom se samo update-uje nakon 'klika'...hmmm ima neko ideju ( i da li je to uopste moguce ) da se 'dinamicki update-uje makar sat ;ppp
Open your mind...think Open Source
 
Odgovor na temu

leka
Dejan Lekić
senior software engineer, 3Developers
Ltd.
London, UK

Član broj: 234
Poruke: 2534
*.racasse.se

Sajt: dejan.lekic.org


+2 Profil

icon Re: neka lepa "boja" za $PS101.04.2004. u 13:27 - pre 243 meseci
Evo sta ja koristim na maltene svim masinama gde imam BASH
Code:

PS1='\[\033]0;$MSYSTEM:\w\007
\033[32m\]\u@\h \[\033[33m\w\033[0m\]
$ '

export PS1

Dejan Lekic
software engineer, MySQL/PgSQL DBA, sysadmin
 
Odgovor na temu

[es] :: Linux :: neka lepa "boja" za $PS1

[ Pregleda: 5046 | Odgovora: 5 ] > FB > Twit

Postavi temu Odgovori

Navigacija
Lista poslednjih: 16, 32, 64, 128 poruka.