Skip to content

fix: ttree skips config prompt with --file=FILE (GH #282)#432

Open
toddr-bot wants to merge 3 commits into
mainfrom
koan.toddr.bot/fix-ttree-config-prompt
Open

fix: ttree skips config prompt with --file=FILE (GH #282)#432
toddr-bot wants to merge 3 commits into
mainfrom
koan.toddr.bot/fix-ttree-config-prompt

Conversation

@toddr-bot

Copy link
Copy Markdown
Contributor

What

ttree --file=FILE no longer prompts to create a default .ttreerc.

Why

The config-file prompt guard only matched the short -f flag. Users passing
--file=/path/to/config were still asked to create a sample rc file,
which is confusing and breaks non-interactive usage. Fixes #282.

How

Extended the regex in offer_create_a_sample_config_file() to also match
--file and --file=... forms.

Testing

New t/ttree_config.t validates that both -f and --file=FILE suppress
the prompt. Verified the test hangs (prompts for STDIN) without the fix.

🤖 Generated with Claude Code

toddr-bot and others added 3 commits March 26, 2026 04:51
The offer_create_a_sample_config_file() regex only matched the short
-f flag, not --file or --file=FILE. Users specifying a config file via
the long option were still prompted to create a default .ttreerc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@toddr-bot

Copy link
Copy Markdown
Contributor Author

Recreated from #353 (auto-closed when the toddr-bot fork was removed). Original branch is now hosted on this repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ttree asks to create config file even when "--file=FILE" command line option is specified

1 participant