summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2017-09-20 20:24:45 +0100
committerUrbain Vaes <urbain@vaes.uk>2017-10-14 16:29:00 +0200
commit95fb4377d328e428f5e07ff154e06780e4166ece (patch)
tree408e68e50dc0059d587a7b93ad3703e0e834dc7e /zsh
parenta8224fda63571be856a0353903e6d7d1cbff45cb (diff)
[vim] Make minor changes
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zshrc10
1 files changed, 10 insertions, 0 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index e6b7939..ac39f56 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -25,3 +25,13 @@ PROMPT='%0~ $ '
# Options
unsetopt histverify
+
+# Use fzf with z
+unalias z 2> /dev/null
+z() {
+ [ $# -gt 0 ] && _z "$*" && return
+ cd "$(_z -l 2>&1 | fzf --height 40% --reverse --inline-info +s --tac --query "$*" | sed 's/^[0-9,.]* *//')"
+ zle && zle reset-prompt
+}
+zle -N z
+bindkey '^z' z