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

Commit

Permalink
general: Added select all
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanaraps committed Jan 28, 2019
1 parent 364431f commit 3249a6d
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions fff
Original file line number Diff line number Diff line change
Expand Up @@ -327,19 +327,15 @@ mark() {
# Mark file for operation.
# If an item is marked in a second directory,
# clear the marked files.
[[ $PWD != "$mark_dir" ]] && {
[[ $PWD != "$mark_dir" ]] &&
marked_files=()
select_all=0
}

if [[ $1 == all ]]; then
if ((select_all == 0)); then
if ((${#marked_files[@]} != ${#list[@]})); then
marked_files=("${list[@]}")
select_all=1
mark_dir="$PWD"
else
marked_files=()
select_all=0
fi

redraw
Expand Down Expand Up @@ -750,15 +746,13 @@ key() {

printf '\e[?25l'
marked_files=()
select_all=0
redraw full
}
;;

# Clear all marked files.
"${FFF_KEY_CLEAR:=c}")
marked_files=()
select_all=0
redraw
;;

Expand Down

0 comments on commit 3249a6d

Please sign in to comment.