finetune line wrapping

This commit is contained in:
Ville Rantanen
2016-08-12 11:31:44 +03:00
parent 81f64a75d8
commit 34b5c2e043

View File

@@ -57,16 +57,20 @@ function deletefolders() {
done < <(find "$@" -depth -type d -print0)
printf "\n"
}
# stop line wrapping
printf '\033[?7l'
# return line wrapping
trap "printf '\033[?7h'" 1 9 15
files=0
folders=0
if [[ "$NOCOUNT" -ne 1 ]]; then
echo Listing files in "${FOLDERS[@]}" ...
# stop line wrapping
printf '\033[?7l'
listfiles "${FOLDERS[@]}"
echo Prepared to delete $files files
fi
# stop line wrapping
printf '\033[?7l'
if [[ $FORCE -eq 0 ]]; then
echo '<ctrl-c> to quit'
read foo
@@ -77,5 +81,5 @@ if [[ "$NOCOUNT" -ne 1 ]]; then
echo Removing remaining $folders folders
fi
deletefolders "${FOLDERS[@]}"
# line wrapping
# return line wrapping
printf '\033[?7h'