From 95fb4377d328e428f5e07ff154e06780e4166ece Mon Sep 17 00:00:00 2001 From: Urbain Vaes Date: Wed, 20 Sep 2017 20:24:45 +0100 Subject: [vim] Make minor changes --- zsh/.zshrc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'zsh') 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 -- cgit v1.2.3