In the 1st form, create a link to TARGET with the name LINK_NAME. In the 2nd
form, create a link to TARGET in the current directory. In the 3rd form, create
-links to each TARGET in DIRECTORY."
+links to each TARGET in DIRECTORY.
+
+Do export LNF_VERBOSE=true for verbose output
+"
if [[ $1 == --help || $1 == -h || $# -eq 0 ]]; then
echo "$help"
fi
if (( ${#to_remove[@]} >= 1 )); then
if type -P trash-put >/dev/null; then
+ if [[ $LNF_VERBOSE == true ]]; then
+ echo "lnf: trash-put -- ${to_remove[*]}"
+ fi
trash-put -- "${to_remove[@]}" || ret=$?
# trash-put will fail to trash a link that goes across filesystems (72),
# and for empty files (74)
return $x
fi
else
+ if [[ $LNF_VERBOSE == true ]]; then
+ echo "lnf: rm -rf -- ${to_remove[*]}"
+ fi
rm -rf -- "${to_remove[@]}"
fi
fi