Skip to content

Commit

Permalink
feat: Assign to SMARTCD_FZF_PREVIEW_CMD only if unset.
Browse files Browse the repository at this point in the history
Change shell parameter expansion `:-` to `:` for `SMARTCD_FZF_PREVIEW_CMD` env.
  • Loading branch information
CodesOfRishi committed Jan 13, 2022
1 parent 3d9a599 commit 5acded8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tools/fzf-utilities.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# configure & validate SMARTCD_FZF_PREVIEW_CMD env
__smartcd::fzf_preview() {
if hash exa 2> /dev/null; then
export SMARTCD_FZF_PREVIEW_CMD=${SMARTCD_FZF_PREVIEW_CMD:-"exa -TaF -I '.git' --icons --group-directories-first --git-ignore --colour=always"}
export SMARTCD_FZF_PREVIEW_CMD=${SMARTCD_FZF_PREVIEW_CMD-"exa -TaF -I '.git' --icons --group-directories-first --git-ignore --colour=always"}
elif hash tree 2> /dev/null; then
export SMARTCD_FZF_PREVIEW_CMD=${SMARTCD_FZF_PREVIEW_CMD:-"tree -I '.git' -C -a"}
else export SMARTCD_FZF_PREVIEW_CMD=${SMARTCD_FZF_PREVIEW_CMD:-""}; fi
export SMARTCD_FZF_PREVIEW_CMD=${SMARTCD_FZF_PREVIEW_CMD-"tree -I '.git' -C -a"}
else export SMARTCD_FZF_PREVIEW_CMD=${SMARTCD_FZF_PREVIEW_CMD-""}; fi
}

# run fzf command
Expand Down

0 comments on commit 5acded8

Please sign in to comment.