From: Siraaj Khandkar Date: Mon, 25 May 2020 16:07:19 +0000 (-0400) Subject: Make delete optional X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=57b370f077fd4a850f4ece6680f2971d623cc909;p=khome.git Make delete optional --- diff --git a/home/bin/dotnet-new-cleanup b/home/bin/dotnet-new-cleanup index d5b5044..c8ef9f6 100755 --- a/home/bin/dotnet-new-cleanup +++ b/home/bin/dotnet-new-cleanup @@ -36,15 +36,21 @@ _delete() { done } - echo 'BOM:' echo '----' _find "$BOM" -_find "$BOM" | _delete "$BOM" echo '' echo 'Trailing carriage return:' echo '-------------------------' _find '\r' -_find '\r' | _delete '\r' + +case "$2" in + -delete) + _find '\r' | _delete '\r' + _find "$BOM" | _delete "$BOM" + ;; + *) + :;; +esac