Make delete optional
authorSiraaj Khandkar <siraaj@khandkar.net>
Mon, 25 May 2020 16:07:19 +0000 (12:07 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Mon, 25 May 2020 16:07:19 +0000 (12:07 -0400)
home/bin/dotnet-new-cleanup

index d5b5044..c8ef9f6 100755 (executable)
@@ -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
This page took 0.028725 seconds and 4 git commands to generate.