From 7bc7f2304fa24c811fdbe8069e963b4deb8a6123 Mon Sep 17 00:00:00 2001 From: Dawid Dziurla Date: Mon, 16 Dec 2019 16:03:01 +0100 Subject: [PATCH] Fix preview in fish shell --- src/ui.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ui.sh b/src/ui.sh index 9c7bf6c..388d3d9 100644 --- a/src/ui.sh +++ b/src/ui.sh @@ -20,8 +20,10 @@ ui::fzf() { ui::select() { local -r cheats="$1" + [[ "$SHELL" =~ 'fish' ]] || local -r sub='$' + local -r script_path="${NAVI_HOME}/navi" - local -r preview_cmd="\"${script_path}\" preview \$(echo \'{}\' | $(arg::serialize_code))" + local -r preview_cmd="\"${script_path}\" preview ${sub:-}(echo \'{}\' | $(arg::serialize_code))" local -r query="$(dict::get "$OPTIONS" query)" local -r entry_point="$(dict::get "$OPTIONS" entry_point)"