projects
/
grml-etc-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2cf5d4e
)
zsh: help-show-abk
author
Bernhard Tittelbach
<bernhard@tittelbach.org>
Fri, 27 Jan 2012 00:24:10 +0000
(
01:24
+0100)
committer
Bernhard Tittelbach
<bernhard@tittelbach.org>
Fri, 27 Jan 2012 00:24:10 +0000
(
01:24
+0100)
etc/zsh/zshrc
patch
|
blob
|
history
diff --git
a/etc/zsh/zshrc
b/etc/zsh/zshrc
index
44de6e8
..
a5098a9
100644
(file)
--- a/
etc/zsh/zshrc
+++ b/
etc/zsh/zshrc
@@
-692,6
+692,7
@@
grml_toggle_abbrev() {
fi
}
fi
}
+#k# Toggle abbreviation expansion on/off
zle -N grml_toggle_abbrev
bindkey '^xA' grml_toggle_abbrev
zle -N grml_toggle_abbrev
bindkey '^xA' grml_toggle_abbrev
@@
-916,8
+917,15
@@
zleiab() {
LBUFFER+=${abk[$MATCH]:-$MATCH}
}
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?
# autoloading
zrcautoload zmv # who needs mmv or rename?