[LUGOS] barve v bash

Miha Tomsic miha.tomsic at guest.arnes.si
Wed Sep 18 18:02:40 CEST 2002


	Hojla!

On sre, 2002-09-18 at 14:52, Damijan Vodopivec wrote:
> kje lahko spreminjam barve bash lupine ?

Barve v bashu (konzola ali *term) spreminjaš z uporabo ubežnih kod
(escape sequences). Najdeš jih na:

  http://www.bluesock.org/~willg/dev/ansi.html

S tem lahko recimo predelaš barve ukaznega pozornika (command prompta):

----
PROMPT_COMMAND='PS1=`if test "$UID" = 0 ; then \
        echo -e "\[\033[00;31m\]\h:\[\033[00m\]\w# " ; \
    else \
        echo -e "\h:\w$ " ; \
    fi `'

export PROMPT_COMMAND
----

Za primer ti pošiljam svoj /etc/issue.

Srečno,

	Miha...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: issue
Type: application/octet-stream
Size: 2042 bytes
Desc: not available
Url : http://liste2.lugos.si/pipermail/lugos-list/attachments/20020918/47a55efb/issue-0001.obj


More information about the lugos-list mailing list