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

custom widget / redraw prompt



Hi all,
i'm currently on a custom widget, which will dis/enable the RPROMPT on
keypress (^P), so i can copy the commandline without the RPROMPT.
What i currently have in my .zshrc is:

switch-rprompt() {
	if [[ -z $RPROMPT ]]; then
		export RPROMPT=$MYRPROMPT
	else
		export RPROMPT=""
	fi
	zle -R
}
zle -N switch-rprompt
bindkey ^P switch-rprompt

but that doesnt works like it should.
Maybe some of you knows whats wrong there, i've already searched the
manpages, but i must be blind or so.

Regards,
Simon



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