X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=e1cfcaef0aa96be2f8ffb53172e4d82cd9222dfc;hb=6c3c1d6fff0381cf5087951188dc23047514b0db;hp=e475070f74c55d4431f8a85adb5c3f4761544f9a;hpb=2e1c62bb3c88eba84567cc34b5c565fc6e0d0ee9;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index e475070..e1cfcae 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1195,10 +1195,10 @@ help_zle_parse_keybindings() 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 @@ -1342,9 +1342,11 @@ function bind2maps () { 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 () { @@ -1853,7 +1855,7 @@ grml_prompt_pre_default=( newline '' path '%B' percent '' - rc '%F{red}' + rc '%B%F{red}' rc-always '' sad-smiley '' shell-level '%F{red}' @@ -1874,7 +1876,7 @@ grml_prompt_post_default=( newline '' path '%b' percent '' - rc '%f' + rc '%f%b' rc-always '' sad-smiley '' shell-level '%f' @@ -2157,7 +2159,7 @@ if is437; then 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.