X-Git-Url: https://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=e1cfcaef0aa96be2f8ffb53172e4d82cd9222dfc;hb=6c3c1d6fff0381cf5087951188dc23047514b0db;hp=b3da7ff7b6fc1e9cadd4106feb38bd5303f1ed3d;hpb=21be0f44c81ec3a902d0db8cfff04b0bb571e1cb;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index b3da7ff..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