1
0
Fork 0

update rmdirs

main
Mari 3 years ago
parent 2dc72f6c44
commit a222db339d
  1. 12
      zsh/customizations/zsh_aliases.zsh

@ -33,7 +33,17 @@ alias mv='mv -i'
function rmdirs()
{
[[ -z $(find $@ -not -type d | tee /dev/stderr | head -n10) ]] && rm -Ir $@ || >&2 echo Files were found, please check again or run rm -Ir manually
RESULT=$(find $@ -not -type d)
if [[ -z $RESULT ]]; then
rm -Ir $@
else
results=$(wc -l <<<$RESULT)
>&2 echo "$results file(s) were found, please check again or run rm -Ir manually:"
echo $RESULT | head -n10 >&2
if [[ $results -gt 10 ]]; then
>&2 echo "... additional files elided"
fi
fi
}
# Use a larger number of KDF rounds and the secure ed25519 key type by default.

Loading…
Cancel
Save