From 73e0d7da48a775fa606e4b455777846b14dfe080 Mon Sep 17 00:00:00 2001 From: amd64-little <173582530+amd64-little@users.noreply.github.com> Date: Thu, 26 Feb 2026 14:57:11 +1030 Subject: [PATCH] Move FFF_LS_COLORS and FFF_HIDDEN checks after setup_options(). This will make sure that FFF_LS_COLORS and FFF_HIDDEN are available from FFF_CONFIG. --- README.md | 2 -- fff | 13 +++++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 28166ea..2231cf9 100644 --- a/README.md +++ b/README.md @@ -167,8 +167,6 @@ Ctrl+C: exit without 'cd'. `FFF_CONFIG` can be added to your `bashrc` (or other shell's configuration files). Everything put in `FFF_CONFIG` file will be sourced globally meaning that e.g. Neovim's terminal will have these settings. -Personal note (can be unreproducible for your): I'm not sure why the only option (maybe there are others) not working in config file is `FFF_HIDDEN` which only works, when fff is run inside terminal manually. - ```sh # Show/Hide hidden files on open. # (Off by default) diff --git a/fff b/fff index 0555560..b6dd797 100755 --- a/fff +++ b/fff @@ -1986,12 +1986,6 @@ main() { ((BASH_VERSINFO[0] > 3)) && read_flags=(-t 0.05) - ((${FFF_LS_COLORS:=1} == 1)) && - get_ls_colors - - ((${FFF_HIDDEN:=0} == 1)) && - shopt -s dotglob - # Create the trash and cache directory if they don't exist. mkdir -p "${XDG_CACHE_HOME:=${HOME}/.cache}/fff" \ "${FFF_TRASH:=${XDG_DATA_HOME:=${HOME}/.local/share}/fff/trash}" @@ -2009,6 +2003,13 @@ main() { get_os get_term_size setup_options + + ((${FFF_LS_COLORS:=1} == 1)) && + get_ls_colors + + ((${FFF_HIDDEN:=0} == 1)) && + shopt -s dotglob + setup_terminal redraw full