]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - shell/zsh/rc
shell: replace valgrind wrapper with environment variable
[config/dotfiles.git] / shell / zsh / rc
index 0af99afb89db0be411dbaab526d462c16d5d6e08..0f6e2e09dae0dffc6cfd6c728a3e581084f8b722 100644 (file)
@@ -184,6 +184,13 @@ bindkey -a '^P' history-beginning-search-backward # binding for Vi-mode
 # after calling ^P.
 bindkey -a '^N' history-beginning-search-forward
 
+# Use current input when pressing Ctrl-R. Thanks to Mikachu in #zsh on
+# Freenode (2016-07-08 20:54 CEST).
+zshrc-history-incremental-pattern-search-backward() {
+    zle .history-incremental-pattern-search-backward $BUFFER
+}
+zle -N history-incremental-pattern-search-backward \
+    zshrc-history-incremental-pattern-search-backward
 # Enable incremental search which is especially useful when the string is an
 # argument and not the command.
 bindkey '^R' history-incremental-pattern-search-backward
@@ -792,7 +799,6 @@ bindkey '^F' complete-files
 compdef slocate=locate
 compdef srsync=rsync
 compdef srsync-incremental=rsync
-compdef svalgrind=valgrind
 compdef sc=systemctl