diff --git a/fish/conf.d/fzf.fish b/fish/conf.d/fzf.fish index b02bea9..5dbdb2c 100644 --- a/fish/conf.d/fzf.fish +++ b/fish/conf.d/fzf.fish @@ -1,10 +1,10 @@ # https://github.com/junegunn/fzf -set -gx FZF_DEFAULT_OPTS "--no-height --layout=reverse" -set -gx FZF_DEFAULT_COMMAND "fd --type=file" +set -gx FZF_DEFAULT_OPTS '--layout=reverse' +set -gx FZF_DEFAULT_COMMAND 'fd --type=file' function __fzf_files set -l output ( - fd --type=file --hidden --follow --color=always --exclude=.git 2>/dev/null | + fd --type=file --hidden --follow --color=always --exclude=.git --strip-cwd-prefix 2>/dev/null | fzf --ansi --preview='bat --style=numbers --color=always {}' --preview-window='right:70%:hidden:wrap' --bind='?:toggle-preview' --expect='ctrl-e' --header='ctrl-e to edit, ? to preview' ) set -l key $output[1]