help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to customize prompt color in *shell* ?


From: Pascal Bourguignon
Subject: Re: How to customize prompt color in *shell* ?
Date: 09 Nov 2004 15:17:36 +0100
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3

"V. L. Simpson" <vls@freeshell.org> writes:

> >>>>> "KKramsch" == KKramsch
> >>>>> <karlUNDERSCOREkramsch@yahooPERIODcom.invalid> writes:
> 
>     > How can one change the color of the prompt in Emacs'
>     > interactive shell?  For some reason, I'm getting a dark
>     > blue prompt over a black background which is very hard to
>     > read (I'm running emacs -nw).  (The commands I type at the
>     > prompt appear in light gray, so that's OK.)
> 
> M-x customize-face RET comint-highlight-prompt
> I used M-x list-faces-display to find that.

Perhaps. You can also use the standard color codes:

[pascal@naiad encours]$ . ~/.ansicodes
[pascal@naiad encours]$ export PS1="$RED$WHITE_BACK$PS1$NORMAL"
[pascal@naiad encours]$ # <== this appears in red over white.

~/.ansicodes contains:


#http://aspell.net/charsets/iso6429.html
#[...]
function CSI () {
    # CONTROL SEQUENCE INTRODUCER
    
    echo -n "["
}
#[...]
function SGR () {
    # SELECT GRAPHIC RENDITION
    
    echo -n "[$(semicolon='';res='';for arg in $@;do 
res=${res}${semicolon}${arg};semicolon=';';done;echo -n ${res})m"
}
#[...]

# Legacy variable. Please use the above functions.

export NORMAL="$(SGR 0)"
export BOLD="$(SGR 1)"
export UNDERLINE="$(SGR 4)"
export BLINK="$(SGR 5)"
export INVERT="$(SGR 7)"
export NO_BOLD="$(SGR 22)"
export NO_UNDERLINE="$(SGR 24)"
export NO_BLINK="$(SGR 25)"
export NO_INVERT="$(SGR 27)"
export BLACK="$(SGR 30)"
export RED="$(SGR 31)"
export GREEN="$(SGR 32)"
export YELLOW="$(SGR 33)"
export BLUE="$(SGR 34)"
export MAGENTA="$(SGR 35)"
export CYAN="$(SGR 36)"
export WHITE="$(SGR 37)"
export BLACK_BACK="$(SGR 40)"
export RED_BACK="$(SGR 41)"
export GREEN_BACK="$(SGR 42)"
export YELLOW_BACK="$(SGR 43)"
export BLUE_BACK="$(SGR 44)"
export MAGENTA_BACK="$(SGR 45)"
export CYAN_BACK="$(SGR 46)"
export WHITE_BACK="$(SGR 47)"

# [...]



-- 
__Pascal Bourguignon__


reply via email to

[Prev in Thread] Current Thread [Next in Thread]