From 02b216c6cb83fee0179f26563041763b4fc39e76 Mon Sep 17 00:00:00 2001 From: Austin Ginder Date: Sat, 16 Aug 2025 19:53:13 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20Dump=20naming?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- commands/dump | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/commands/dump b/commands/dump index dccd5a2..13b11b1 100644 --- a/commands/dump +++ b/commands/dump @@ -22,10 +22,14 @@ function run_dump() { local OUTPUT_BASENAME OUTPUT_BASENAME=$(basename "$SEARCH_DIR") + local OUTPUT_FILE if [ "$OUTPUT_BASENAME" == "." ]; then - OUTPUT_BASENAME="dump" + # If searching in the current dir, use the folder's name for the output file. + OUTPUT_BASENAME=$(basename "$(pwd)") + OUTPUT_FILE="${OUTPUT_BASENAME}-dump.txt" + else + OUTPUT_FILE="${OUTPUT_BASENAME}.txt" fi - local OUTPUT_FILE="${OUTPUT_BASENAME}.txt" # --- 3. Process Files --- > "$OUTPUT_FILE"