erdtree
erdtree copied to clipboard
Regex may should be consider in the prefix exclustion
The -p options is used to exclude files or directories with some specified prefixes. But if some hidden or system files start with "." prefixes, they can't be ignored.
I guessed the match didn't use Regex?
[... tensorflow]$ erdtree -l 1 -p "." . (228.41 MB) ├─ CODE_OF_CONDUCT.md (5.37 KB) ├─ .pylintrc (0 B) ├─ .bazelversion (6 B) ├─ tools (4.91 KB) ├─ arm_compiler.BUILD (1.18 KB) ├─ configure.py (53.52 KB) ├─ LICENSE (15.50 KB) ├─ configure (285 B)
The help text specifies that the -p option is used to only exclude directories:
-p Comma-separated list of prefixes. Directories containing any of
these prefixes will not be traversed. Their memory size will also be ignored.
This was an intentional choice, but perhaps this might lead to some bad user-experience. Do you have any suggestions on what should change?
If the performance is not a problem, I suggest support Regex Match and prefiexes could support both include and exclude.
Such as:
erdtree -p in "\."
Only display files match "."
erdtree -p ex "\."
Only exclude files match "."
And once it support Regex, it will be more powerful.
Rewrite no longer does regex exclusion: https://github.com/solidiquis/erdtree/pull/9