From 642698908c2f0793f3ea8bea731de8a656a562ee Mon Sep 17 00:00:00 2001 From: B P Date: Sun, 18 May 2025 19:53:27 +0300 Subject: [PATCH 1/2] fixed create cache dir --- fff | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fff b/fff index 0555560..21fb3fb 100755 --- a/fff +++ b/fff @@ -1994,7 +1994,8 @@ main() { # 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}" + "${FFF_TRASH:=${XDG_DATA_HOME:=${HOME}/.local/share}/fff/trash}" \ + "${XDG_CACHE_HOME:=${HOME}/.cache}/fff/history" # 'nocaseglob': Glob case insensitively (Used for case insensitive search). # 'nullglob': Don't expand non-matching globs to themselves. From ff24f71c4b826a32d822d5fc5de0e6bb8c7448e6 Mon Sep 17 00:00:00 2001 From: B P Date: Sun, 18 May 2025 23:15:51 +0300 Subject: [PATCH 2/2] added variable CURRENT_EDITOR for txt files --- fff | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fff b/fff index 21fb3fb..767e0b2 100755 --- a/fff +++ b/fff @@ -1,5 +1,9 @@ #!/usr/bin/env bash +CURRENT_EDITOR=nano +#CURRENT_EDITOR=micro +#CURRENT_EDITOR=vi + get_os() { # Figure out the current operating system to set some specific variables. # '$OSTYPE' typically stores the name of the OS kernel. @@ -1022,7 +1026,7 @@ open() { text/*|*x-empty*|*json*) clear_screen reset_terminal - "${VISUAL:-${EDITOR:-vi}}" "$1" + "${VISUAL:-${EDITOR:-"${CURRENT_EDITOR}"}}" "$1" setup_terminal redraw ;;