summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
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