if [[ "$cline" == (#s)[[:space:]]#\#k\#[[:space:]]##(#b)(*)[[:space:]]#(#e) ]]; then
lastkeybind_desc="$match[*]"
num_lines_elapsed=0
- #zsh pattern: matches lines that set a keybinding using bindkey or compdef -k
+ #zsh pattern: matches lines that set a keybinding using bind2map, bindkey or compdef -k
# ignores lines that are commentend out
# grabs first in '' or "" enclosed string with length between 1 and 6 characters
- elif [[ "$cline" == [^#]#(bindkey|compdef -k)[[:space:]](*)(#b)(\"((?)(#c1,6))\"|\'((?)(#c1,6))\')(#B)(*) ]]; then
+ elif [[ "$cline" == [^#]#(bind2maps[[:space:]](*)-s|bindkey|compdef -k)[[:space:]](*)(#b)(\"((?)(#c1,6))\"|\'((?)(#c1,6))\')(#B)(*) ]]; then
#description prevously found ? description not more than 2 lines away ? keybinding not empty ?
if [[ -n $lastkeybind_desc && $num_lines_elapsed -lt 2 && -n $match[1] ]]; then
#substitute keybinding string with something readable
if (( ${+terminfo[smkx]} )) && (( ${+terminfo[rmkx]} )); then
function zle-smkx () {
+ emulate -L zsh
printf '%s' ${terminfo[smkx]}
}
function zle-rmkx () {
+ emulate -L zsh
printf '%s' ${terminfo[rmkx]}
}
function zle-line-init () {
newline ''
path '%B'
percent ''
- rc '%F{red}'
+ rc '%B%F{red}'
rc-always ''
sad-smiley ''
shell-level '%F{red}'
newline ''
path '%b'
percent ''
- rc '%f'
+ rc '%f%b'
rc-always ''
sad-smiley ''
shell-level '%f'
unset i
zstyle ':prompt:grml(|-large|-chroot):right:setup' use-rprompt false
elif (( EUID == 0 )); then
- zstyle ':prompt:grml(|-large|-chroot):*:items:user' pre '%F{red}'
+ zstyle ':prompt:grml(|-large|-chroot):*:items:user' pre '%B%F{red}'
fi
# Finally enable one of the prompts.