Skip to content

Commit

Permalink
[fzf] use FZF_DEFAULT_OPTS_FILE instead of FZF_DEFAULT_OPTS
Browse files Browse the repository at this point in the history
Newly implemented in junegunn/fzf#3618

Reduces work keeping fzf default opts consistent across shells

Allows changing opts without restarting or reloading shell
  • Loading branch information
PatrickF1 committed Apr 7, 2024
1 parent 17d9765 commit 371eae8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export HISTTIMEFORMAT='%F %T '
shopt -s histverify # don't immediately execute commands from history but copy them onto command line
shopt -s histappend # append to bash history instead of overwriting

export FZF_DEFAULT_OPTS="--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker='*'"
export FZF_DEFAULT_OPTS_FILE="$HOME/.config/fzf"

test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"

Expand Down
2 changes: 1 addition & 1 deletion .config/fish/config.fish
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ set -g fish_greeting
fzf_configure_bindings --directory=\cf --git_log=\cl --git_status=\cs --processes=\cp
set fzf_diff_highlighter delta --paging=never --width=20

set -x FZF_DEFAULT_OPTS --cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"
set -x FZF_DEFAULT_OPTS_FILE ~/.config/fzf

# n: start in type-to-nav mode
# A: disable automatically jumping into directories when in type-to-nav mode
Expand Down
1 change: 1 addition & 0 deletions .config/fzf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--cycle --layout=reverse --border --height=90% --preview-window=wrap --marker="*"

0 comments on commit 371eae8

Please sign in to comment.