diff options
author | Dylan Araps <dylan.araps@gmail.com> | 2019-01-05 19:49:17 +0200 |
---|---|---|
committer | Dylan Araps <dylan.araps@gmail.com> | 2019-01-05 19:49:17 +0200 |
commit | 30a81c72a53bc1f737e51bee1b0e3f3f372b7935 (patch) | |
tree | b3f6f3a4ddc46bfb9ac132d2acc412e9a60f7938 | |
parent | f293c54fce8b6593a0b29d15d89b15ca4d7c8217 (diff) |
bug fixes0.3.2
-rwxr-xr-x | fff | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -42,7 +42,7 @@ open() { [[ -f $1 ]] && { [[ "$OSTYPE" == darwin* ]] && { oc=open; fa="bIL"; } case "$(file "-${fa:-biL}" "$1")" in - text/*|inode/x-empty*) "${EDITOR:-vi}" "$1"; printf '\e[?25l' ;; + text/*|*x-empty*|*json*) "${EDITOR:-vi}" "$1"; printf '\e[?25l' ;; *) nohup "${FFF_OPENER:-${oc:-xdg-open}}" "$1" &>/dev/null & disown esac } @@ -87,8 +87,8 @@ key() { \~) g="$PWD"; hist; open ~ ;; t) g="$PWD"; hist; open "$FFF_TRASH" ;; - [1-9]) fa="FFF_FAV${1}"; fa="${!fa}" - [[ $fa ]] && { g="$PWD"; hist; open "${fa%/}"; } ;; + [1-9]) fav="FFF_FAV${1}"; fav="${!fav}" + [[ $fav ]] && { g="$PWD"; hist; open "$fav"; } ;; s) printf '\e[?7h\e[?25h\e[2J\e[H'; cd "$PWD" && "$SHELL"; refresh ;; q) exit ;; |