From 3d9127ef301d787ebf0cb62d59b01d606cb86f62 Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Tue, 29 Nov 2016 17:15:09 +0530 Subject: [PATCH] fzf: Use only one unescaped "$cwd" in file-widget --- .config/fish/fzf.fish | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.config/fish/fzf.fish b/.config/fish/fzf.fish index b65db88f..1578bc5d 100644 --- a/.config/fish/fzf.fish +++ b/.config/fish/fzf.fish @@ -57,15 +57,15 @@ bind \cr __fzf-history-widget ## restrict search to this path. ## TODO: Report upstream. Makes '**' obsolete for bash and zsh. function __fzf-file-widget - set -l cwd_esc (commandline -t) + set -l cwd (commandline -t) ## The commandline token might be escaped, we need to unescape it. - set -l cwd (eval "printf '%s' $cwd_esc") + set cwd (eval "printf '%s' $cwd") if [ ! -d "$cwd" ] set cwd . end set -q FZF_CTRL_T_COMMAND; or set -l FZF_CTRL_T_COMMAND " - command find -L $cwd_esc \\( -path $cwd_esc'*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \ + command find -L \$cwd \\( -path \$cwd'*/\\.*' -o -fstype 'dev' -o -fstype 'proc' \\) -prune \ -o -type f -print \ -o -type d -print \ -o -type l -print 2> /dev/null | sed 1d"