X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=795cc378dfb3e94f148f171e3b04adbb200464d0;hb=f3ebf5345a94311fa0322e510d485e3b03b77cea;hp=4f3070f88394dd970326cff20689bade6398ba0c;hpb=bc40f3c9959e7b9b37b3c193262550691ac95c55;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 4f3070f..795cc37 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -406,6 +406,7 @@ check_com() { salias() { emulate -L zsh local only=0 ; local multi=0 + local key val while [[ $1 == -* ]] ; do case $1 in (-o) only=1 ;; @@ -1290,7 +1291,7 @@ function zrcautozle() { } function zrcgotwidget() { - (( ${+widgets[$i]} )) + (( ${+widgets[$1]} )) } function zrcgotkeymap() { @@ -1313,7 +1314,7 @@ zstyle ':completion:hist-complete:*' completer _history typeset -ga grml_missing_features function zrcbindkey() { - if (( ARGC && ${+widgets[${argv[-1]}]} )); then + if (( ARGC )) && zrcgotwidget ${argv[-1]}; then bindkey "$@" fi } @@ -1392,6 +1393,7 @@ bind2maps viins vicmd -- Right vi-forward-char bind2maps viins vicmd -- Right vi-forward-char if zrcgotkeymap menuselect; then + #m# k Shift-tab Perform backwards menu completion bind2maps menuselect -- BackTab reverse-menu-complete #k# menu selection: pick item but stay in the menu @@ -1443,13 +1445,6 @@ zrcbindkey "\e[6~" history-beginning-search-forward-end # PageDown #k# Insert Unicode character zrcbindkey '^xi' insert-unicode-char -#m# k Shift-tab Perform backwards menu completion -if [[ -n "$terminfo[kcbt]" ]]; then - zrcbindkey "$terminfo[kcbt]" reverse-menu-complete -elif [[ -n "$terminfo[cbt]" ]]; then # required for GNU screen - zrcbindkey "$terminfo[cbt]" reverse-menu-complete -fi - #k# Toggle abbreviation expansion on/off zrcbindkey '^xA' grml_toggle_abbrev zrcbindkey "^x^h" commit-to-history