From: Bernhard Tittelbach Date: Fri, 27 Jan 2012 00:24:10 +0000 (+0100) Subject: zsh: help-show-abk X-Git-Tag: v0.5.5~3 X-Git-Url: http://git.grml.org/?p=grml-etc-core.git;a=commitdiff_plain;h=cd5a844ce6909c585bfb28d2d02ffc01d31ef120 zsh: help-show-abk --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 44de6e8..a5098a9 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -692,6 +692,7 @@ grml_toggle_abbrev() { fi } +#k# Toggle abbreviation expansion on/off zle -N grml_toggle_abbrev bindkey '^xA' grml_toggle_abbrev @@ -916,8 +917,15 @@ zleiab() { LBUFFER+=${abk[$MATCH]:-$MATCH} } -zle -N zleiab -bindkey ",." zleiab +zle -N zleiab && bindkey ",." zleiab + +#f# display contents of assoc array $abk +help-show-abk() +{ + zle -M "$(print "Type ,. after these abbreviations to expand them:"; print -a -C 2 ${(kv)abk})" +} +#k# Display list of abbreviations that expand when followed by ,. +zle -N help-show-abk && bindkey '^Xb' help-show-abk # autoloading zrcautoload zmv # who needs mmv or rename?