Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Jan 5, 2019
1 parent f293c54 commit 30a81c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fff
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down Expand Up @@ -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 ;;
Expand Down

0 comments on commit 30a81c7

Please sign in to comment.