summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-01-05 19:49:17 +0200
committerDylan Araps <dylan.araps@gmail.com>2019-01-05 19:49:17 +0200
commit30a81c72a53bc1f737e51bee1b0e3f3f372b7935 (patch)
treeb3f6f3a4ddc46bfb9ac132d2acc412e9a60f7938
parentf293c54fce8b6593a0b29d15d89b15ca4d7c8217 (diff)
bug fixes0.3.2
-rwxr-xr-xfff6
1 files changed, 3 insertions, 3 deletions
diff --git a/fff b/fff
index ec4153f..40e10ad 100755
--- a/fff
+++ b/fff
@@ -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 ;;