the_earnest/dotfiles
added verbose option (-v) to function f
Commit 894f880a2299 · The Earnest · 2026-11-23 14:37 +0000
Comments
No comments yet.
Diff
diff --git a/godir/godir.bash b/godir/godir.bash
--- a/godir/godir.bash
+++ b/godir/godir.bash
@@ -1,4 +1,10 @@
function f {
+
+ if [[ "$1" == "-v" ]]; then
+ local VERBOSE=verbose
+ shift
+ fi
+
FINDCMD="find "
# exclusions
@@ -16,7 +22,8 @@
FINDCMD+=" -iname '*$i*'"
done
FINDCMD+=" -print"
- echo FINDCMD=$FINDCMD
+
+ [[ -n $VERBOSE ]] && echo FINDCMD=$FINDCMD
eval "$FINDCMD"
}