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

RPROMPT in linux consoles (the return of message 12545)



Hi,

So as the subject says, I have this problem again :
(see http://www.zsh.org/mla/users/2008/msg00162.html)
in linux consoles with the Phil's prompt and LANG=fr_FR.UTF-8, RPROMPT
is displayed partially on two lines. If you set LANG to fr_FR (no utf8), RPROMPT
goes back to the right place. 
(see http://layslair.ath.cx/~laynef/zsh_10.png)

I have this problem on a fresh install of Debian lenny (and then
after upgrade with sid) with the minimal zshrc in attachment ("zsh -f"
and "source zshrc_test").

-- 
Anthony CHARLES
export LANG=fr_FR.UTF-8

setopt extended_glob

setprompt () { 

    setopt prompt_subst

    autoload -U colors 
    zmodload zsh/terminfo zsh/datetime
    if [[ "$terminfo[colors]" -ge 8 ]]; then
	colors
    fi
    for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
        eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}'
        eval PR_LIGHT_$color='%{$fg[${(L)color}]%}'
        (( count = $count + 1 ))
    done
    PR_NO_COLOUR="%{$terminfo[sgr0]%}"

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

    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]:--}


 ###
    # Finally, the prompt.

    PROMPT='%m:%l%#'

    RPROMPT=' $PR_CYAN$PR_SHIFT_IN$PR_HBAR$PR_BLUE$PR_HBAR$PR_SHIFT_OUT\
($PR_YELLOW%D{%a,%d/%m/%y} s$PR_weeknum$PR_BLUE)$PR_SHIFT_IN$PR_HBAR$PR_CYAN$PR_LRCORNER$PR_SHIFT_OUT$PR_NO_COLOUR'

}
setprompt



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