Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Prompt coloring question
- X-seq: zsh-users 13024
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: "Zsh Users" <zsh-users@xxxxxxxxxx>
- Subject: Re: Prompt coloring question
- Date: Sun, 13 Jul 2008 10:52:46 -0700
- In-reply-to: <2d460de70807130637w3dd3cce3l695ed4c28d758ca7@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <2d460de70807121443s1affa065n5451a763a4e70374@xxxxxxxxxxxxxx> <20080713022342.GA51466@xxxxxxxxxxxxxxxxxxxx> <2d460de70807130637w3dd3cce3l695ed4c28d758ca7@xxxxxxxxxxxxxx>
On Jul 13, 3:37pm, Richard Hartmann wrote:
} Subject: Re: Prompt coloring question
}
} On Sun, Jul 13, 2008 at 04:23, Phil Pennock
} <zsh-workers+phil.pennock@xxxxxxxxxxxx> wrote:
}
} > Define invert? The sequence you provide is a reset to default and
} > normal red text, so you'll need to be clearer about what you want and
} > what you tried, instead of what you started from.
}
} I want to use %S and %s to invert the user name so I know I am on a
} remote system. While I can easily invert other colors, like light green
} ( $'%{\e[1;32m%}' ), I can't invert red.
Read again what Phil wrote.
$'%{\e[1;32m%}' is not "light green", it's "bold green" -- the "1" is
bold, the "32" is green. Similarly, $'%{\e[0;31m%}' is not "red", it's
"turn everything else off" (0) and then "red" (31). That first "0"
disables %S before it has a chance to do anything. If you were to use
%S%{$'\e[31m'%} without the "0;" it would work as expected.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author