the_earnest/dotfiles

added exclusions (.git and .hg) to function f()

Commit 05e7ac5ab0d2 · The Earnest · 2026-11-20 00:00 +0000

Changeset
05e7ac5ab0d24f043d67d77ba643b7a06778776b

View source at this commit

Comments

No comments yet.

Log in to comment

Diff

diff --git a/godir/godir.bash b/godir/godir.bash
--- a/godir/godir.bash
+++ b/godir/godir.bash
@@ -1,5 +1,13 @@
 function f {
-	FINDCMD="find -type d -path '*/Android' -prune -o"
+	FINDCMD="find "
+
+	# exclusions
+	FINDCMD+="-type d \( "
+	FINDCMD+="-path '*/Android' -o "
+	FINDCMD+="-path '*/.hg' -o "
+	FINDCMD+="-path '*/.git' "
+	FINDCMD+=" \) -prune -o"
+
 	for i in "$@"; do
 		FINDCMD+=" -iname '"
 		FINDCMD+='*'"$i"'*'