Fix preview in fish shell

This commit is contained in:
Dawid Dziurla 2019-12-16 16:03:01 +01:00
parent 76177df091
commit 7bc7f2304f
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B

View file

@ -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)"