Merge pull request #169 from dawidd6/fix-fish-preview

Fix preview in fish shell

Closes: #168

Might not be the best solution tho, but it does the trick.
This commit is contained in:
Denis Isidoro 2019-12-17 13:35:51 -03:00 committed by GitHub
commit 61ba531490
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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