Using the 'commit-to-history' widget a user can add command lines
to the shell's history without executing it. Bound to: <ctrl-x><ctrl-h>
* vimrc: only set screen title if the caller explicitly asks for it.
* zshrc: ask for setting screen title in vim via a wrapper function.
+ * zshrc: add commit-to-history widget, that allows users to add
+ command lines to zsh's history without executing [Closes: issue407]
- -- Frank Terbeck <ft@grml.org> Thu, 02 Apr 2009 13:11:12 +0200
+ -- Frank Terbeck <ft@grml.org> Fri, 03 Apr 2009 22:49:53 +0200
grml-etc-core (0.3.65) unstable; urgency=low
zle -N grml_toggle_abbrev
bindkey '^xA' grml_toggle_abbrev
+# add a command line to the shells history without executing it
+commit-to-history() {
+ print -s ${(z)BUFFER}
+ zle send-break
+}
+zle -N commit-to-history
+bindkey "^x^h" commit-to-history
+
# }}}
# a generic accept-line wrapper {{{