the_earnest/dotfiles

improved verbose output

Commit 0a9c05ec4d01 · The Earnest · 2026-11-19 23:34 +0000

Changeset
0a9c05ec4d018a85842ea67a66b3ada136cda26c

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
@@ -45,15 +45,23 @@
 	fi
 
 	CONFIG_FILE=~/.godirrc
-	[[ -e "$CONFIG_FILE" ]] && source "$CONFIG_FILE"
+	if [[ -e "$CONFIG_FILE" ]]; then
+		[[ -n $VERBOSE ]] && echo "gd: reading config file"
+		source "$CONFIG_FILE"
+	else
+		[[ -n $VERBOSE ]] && echo "gd: no config file"
+	fi
 	[[ -z $MAXDEPTH ]] && MAXDEPTH=2
 
 	GD_PRUNE_FILE=~/gd.prune
 	if [[ -e "$GD_PRUNE_FILE" ]]
 	then
+		[[ -n $VERBOSE ]] && echo "gd: reading prune file"
 		cat "$GD_PRUNE_FILE" | while read LINE; do
 			echo $LINE
 		done
+	else
+		[[ -n $VERBOSE ]] && echo gd: no prune file
 	fi
 
 	# case 4: must perform search