diff zshrc @ 83:dd76ef1174f1

Add q as fzf - z mashup
author zegervdv <zegervdv@me.com>
date Wed, 30 Jul 2014 19:12:19 +0200
parents 16edf05ad21a
children 3a37086414bd
line wrap: on
line diff
--- a/zshrc	Sun Jul 27 23:15:54 2014 +0200
+++ b/zshrc	Wed Jul 30 19:12:19 2014 +0200
@@ -88,4 +88,14 @@
 
 [[ -f ~/.zshrc.local ]] && source ~/.zshrc.local
 
+bindkey '\e[A' history-beginning-search-backward
+bindkey '\e[B' history-beginning-search-forward
+
 source ~/.fzf.zsh
+q() {
+  if [[ -z "$*" ]]; then
+    cd "$(_z -l 2>&1 | sed -n 's/^[ 0-9.,]*//p' | fzf)"
+  else
+    _z "$@"
+  fi
+}