Skip to content

fzf plugin not checking for 'bat' and 'fd' #3

@victorbrca

Description

@victorbrca

The 'fzf' plugin is not checking if 'bat' and 'fd' are installed.

# Settings for fzf
if command -v fzf > /dev/null ; then
  export FZF_COMPLETION_TRIGGER='**'
  # Cycle with tab
  export FZF_DEFAULT_OPTS='--bind tab:down --cycle'
  . /usr/share/fzf/key-bindings.bash
  . /usr/share/fzf/completion.bash
  # help:preview:Interactive preview for files in a folder
  preview () 
  {
    fd -d 1 -t f | fzf --preview 'bat --color "always" --wrap "auto" {}' \
    --bind 'alt-j:preview-down,alt-k:preview-up,ctrl-f:preview-page-down,ctrl-b:preview-page-up,ctrl-q:abort,ctrl-m:execute:(bat --paging=always \
    {} < /dev/tty)' --preview-window=right:70%
  }
else
  echo "[bash-config: fzf] fzf is not installed"
fi

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions