Repository navigation
Scan the current directory for an explicit -p . instead of prompting [patch] - #169
Merged
Merged
Conversation
…[patch] "." was both the default for --path and the marker that made each verb ask for one, so -p . prompted and read the next stdin line as the path. With input piped in (echo y | Deduplicate -p .) the confirmation became the directory. PathString is now null when the option is left out, verbs prompt only when it is null or blank, and the run resets it to null. Fixes #145 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U5RBnMaTjZdMDRNttjeZ3u
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #145
Before:
"."was both the default for--pathand the marker that made each verb prompt, soScan -p .asked for a path, andecho y | Deduplicate -p .read theyas the directory.After:
-p .scans the current directory without prompting. Leaving out-pstill prompts.How:
BaseVerb.PathStringis nowstring?and defaults tonull.BaseVerb<T>.Runresets it tonullin itsfinally.Scan,DryRun,DeduplicateandStatsprompt only whenstring.IsNullOrWhiteSpace(PathString).ExplicitPathTestsparses real command lines throughProgram.Verbs. It checks that-p ./--path .doesn't prompt in any of the four verbs, thatDeduplicate --path .withyon stdin deletes the copy, and that leaving out-pstill prompts. With the fix reverted, the four-p .tests fail.Tests: 72 total, 70 passed, 2 skipped (the same two as on main, which need an unprivileged user).
🤖 Generated with Claude Code
https://claude.ai/code/session_01U5RBnMaTjZdMDRNttjeZ3u
Generated by Claude Code