From cd5a844ce6909c585bfb28d2d02ffc01d31ef120 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Fri, 27 Jan 2012 01:24:10 +0100 Subject: [PATCH] zsh: help-show-abk --- etc/zsh/zshrc | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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? -- 2.1.4