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

Commit

Permalink
fixed hangs in bash 3. Closes #27 #26
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Jan 4, 2019
1 parent cfb2c16 commit 79894d0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fff
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ f_print() {
printf '\e[K%b%s\e[m\n' "$fo" "$path"; fo=
}
printf '\e[3%sm\e[%s;H\e[K\n\e[K%s\e[m\e[H' "${FFF_COL2:-7}" "$((LINES-2))" \
"${PWD/\/\//\/} (${l:-1}/$((c-1))) ${co:+${pr[*]}: ${co##*/} [p]}"
"${PWD/\/\///} (${l:-1}/$((c-1))) ${co:+${pr[*]}: ${co##*/} [p]}"
}

hist() {
Expand Down Expand Up @@ -60,10 +60,9 @@ prompt() {

key() {
case "${1: -1}" in
C|l|"") [[ -d "${f[l]}" ]] && hist; open "${f[l]/#\/\//\/}"; g= ;;
C|l|"") [[ -d "${f[l]}" ]] && hist; open "${f[l]}"; g= ;;
D|h) open "${g:-${PWD%/*}}";
[[ -z $g ]] && ((BASH_VERSINFO[0]>3)) && \
((l=${l2[n]/:*},k=${l2[--n]/*:}))
[[ -z $g ]] && ((n=n<0?0:n,l=${l2[n]/:*},k=${l2[n-1]/*:},n--))
[[ $PWD == / ]] && l=0; g=; refresh ;;

g) l=0; refresh ;;
Expand Down

0 comments on commit 79894d0

Please sign in to comment.