diff --git a/functions/__fzf_preview_file.fish b/functions/__fzf_preview_file.fish index 03adfea7..440d6bb1 100644 --- a/functions/__fzf_preview_file.fish +++ b/functions/__fzf_preview_file.fish @@ -16,14 +16,14 @@ function __fzf_preview_file --description "Print a preview for the given file ba else if test -f "$file_path" # regular file if set --query fzf_preview_file_cmd # need to escape quotes to make sure eval receives file_path as a single arg - eval $fzf_preview_file_cmd \"$file_path\" + eval "$fzf_preview_file_cmd '$file_path'" else bat --style=numbers --color=always "$file_path" end else if test -d "$file_path" # directory if set --query fzf_preview_dir_cmd # see above - eval $fzf_preview_dir_cmd \"$file_path\" + eval "$fzf_preview_dir_cmd '$file_path'" else # -A list hidden files as well, except for . and .. # -F helps classify files by appending symbols after the file name