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



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.

-- 
Anthony CHARLES

Attachment: signature.asc
Description: Digital signature



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