From 76a0f58f9fa61ac90ebc8936cfd24d35e1ece27e Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Wed, 29 Jul 2020 17:19:50 +0100 Subject: [PATCH] makes fzf go to top on change --- shells/zsh/includes/fzf.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shells/zsh/includes/fzf.zsh b/shells/zsh/includes/fzf.zsh index e0ef6f4a..5114bcdb 100644 --- a/shells/zsh/includes/fzf.zsh +++ b/shells/zsh/includes/fzf.zsh @@ -1,6 +1,6 @@ # this rg command will get a list of files that are not in gitignore or similar export FZF_DEFAULT_COMMAND="fd --type f --hidden --follow --color=always --exclude .git --exclude .PlayOnLinux --exclude \"PlayOnLinux\'s virtual drives\"" -export FZF_DEFAULT_OPTS="--reverse --ansi --height 40%" +export FZF_DEFAULT_OPTS="--reverse --ansi --height 40% --bind change:top" export FZF_CTRL_R_OPTS="" export FZF_CTRL_T_OPTS="$FZF_DEFAULT_OPTS --ansi --preview \"fzf-preview {}\"" export FZF_ALT_C_OPTS="$FZF_DEFAULT_OPTS --ansi --preview \"fzf-preview {}\"" @@ -56,8 +56,9 @@ if [ "$sourced" = "True" ]; then if [ "${LBUFFER[-1]}" != " " ]; then current="$lastWord" + current="${current/\~/$HOME}" else - current="$PWD" + current="" fi # An array of commands that should use dir search instead of file search