Skip to content

Commit

Permalink
fix when FZF_DEFAULT_OPTS is set
Browse files Browse the repository at this point in the history
  • Loading branch information
PatrickF1 committed Apr 7, 2024
1 parent 5a7c966 commit 5cc949a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions functions/_fzf_wrapper.fish
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ function _fzf_wrapper --description "Prepares some environment variables before
# Use --function so that it doesn't clobber SHELL outside this function.
set -f --export SHELL (command --search fish)

# If FZF_DEFAULT_OPTS or FZF_DEFAULT_OPTS_FILE is not set, then set some sane defaults.
# If neither FZF_DEFAULT_OPTS nor FZF_DEFAULT_OPTS_FILE are set, then set some sane defaults.
# See https://github.com/junegunn/fzf#environment-variables
if not set --query FZF_DEFAULT_OPTS || not set --query FZF_DEFAULT_OPTS_FILE
set --query FZF_DEFAULT_OPTS FZF_DEFAULT_OPTS_FILE
if test $status -eq 2
# cycle allows jumping between the first and last results, making scrolling faster
# layout=reverse lists results top to bottom, mimicking the familiar layouts of git log, history, and env
# border shows where the fzf window begins and ends
Expand Down

0 comments on commit 5cc949a

Please sign in to comment.