Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Phil's prompt is not working when LANG is set to UTF-8



On Mon, Feb 11, 2008 at 04:07:09PM +0100, antho.charles@xxxxxxxxx wrote:
> Hi,

> I didn't have this problem on Debian etch, but it appears when I
> upgraded to lenny. It's the same problem: if I set LANG to a non utf8
> encoding (fr_FR instead of fr_FR.UTF-8), RPROMPT is good, otherwise
> it's partially on another line and the cusor is after RPROMPT.
> (cf. http://tinyurl.com/3xjeqt)
> I "solve" this problem with:

> -- 8< -- 8< --

>  # See if we can use extended characters to look nicer.

>  if [[ $TERM != linux ]]; then
>     typeset -A altchar
>     set -A altchar ${(s..)terminfo[acsc]}
>     PR_SET_CHARSET="%{$terminfo[enacs]%}"
>     PR_SHIFT_IN="%{$terminfo[smacs]%}"
>     PR_SHIFT_OUT="%{$terminfo[rmacs]%}"
>     PR_HBAR=${altchar[q]:--}
>     PR_ULCORNER=${altchar[l]:--}
>     PR_LLCORNER=${altchar[m]:--}
>     PR_LRCORNER=${altchar[j]:--}
>     PR_URCORNER=${altchar[k]:--}
> fi
> -- 8< -- 8< --

> I don't define those variables if I'm in a console, then the prompt
> looks good but without the fancy stuff, so it's not the real answer.
> (cf. http://tinyurl.com/2bjl6x)
> And my consoles are already in unicode mode.

This could be a nice solution for the time being, at least when I call
the auto completion via double tabs I won't go blind :) though we
really need a real one.

> -- 
> Anthony CHARLES

-- 
Wael Nasreddine
http://wael.nasreddine.com
PGP: 1024D/C8DD18A2 06F6 1622 4BC8 4CEB D724  DE12 5565 3945 C8DD 18A2

.: An infinite number of monkeys typing into GNU emacs,
   would never make a good program. (L. Torvalds 1995) :.

Attachment: pgp8f7G7CYmut.pgp
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author