1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-04-28 10:23:23 -07:00

add a directory indicator to suggested files

This commit is contained in:
Connor Olding 2021-10-19 09:11:56 +02:00
parent 48023d9b7b
commit 62555ae5a1

View File

@ -99,11 +99,13 @@ find_new_files() {
if [ -d "$d2" ]; then if [ -d "$d2" ]; then
find_new_files "$d1" "$d2" find_new_files "$d1" "$d2"
elif [ ! "$d1" -ef "$d2" ]; then elif [ ! "$d1" -ef "$d2" ]; then
local ind=
[ ! -d "$d1" ] || ind=/
if [ "$VERBOSE" -lt 1 ]; then if [ "$VERBOSE" -lt 1 ]; then
printf ' + %s\n' "$d1" >&2 printf ' + %s%s\n' "$d1" "$ind" >&2
else else
#printf 'new destination file. consider manually moving it:\n' >&2 #printf 'new destination file. consider manually moving it:\n' >&2
printf '\033[32m + \033[0m %s\n' "$d1" >&2 printf '\033[32m + \033[0m %s%s\n' "$d1" "$ind" >&2
fi fi
fi fi
done done