diff --git a/fff b/fff index 0555560..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 ;; @@ -1994,7 +1998,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.