Skip to content

Improve CLI robustness, depth handling, and ignore pattern supportImprove rptree cli#10

Open
davi-rf wants to merge 5 commits intorealpython:mainfrom
davi-rf:improve-rptree-cli
Open

Improve CLI robustness, depth handling, and ignore pattern supportImprove rptree cli#10
davi-rf wants to merge 5 commits intorealpython:mainfrom
davi-rf:improve-rptree-cli

Conversation

@davi-rf
Copy link

@davi-rf davi-rf commented Mar 17, 2026

This PR improves the robustness, usability, and correctness of the CLI and tree generation logic.

Improvements

  • Fixed depth-level behavior to correctly reflect the intended tree depth
  • Enhanced --ignore option to support pattern matching using fnmatch
  • Added warning when .gitignore support is requested but pathspec is not installed
  • Replaced exit() with sys.exit() for proper script termination
  • Improved overall code quality and consistency

Notes

  • Existing behavior is preserved
  • No breaking changes introduced

These changes improve usability while keeping the tool simple and aligned with its original purpose.
I have already tested it and it's working well.
Ready to merge.

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.

1 participant