I'm trying to use the tree command to list my current git directory.
I want to exclude every files that match a gitignore pattern. The solution found here seems promising.
Unfortunately it seems that the tree command does not ignore full path pattern properly.
For example, here is a simple directory structure:
. |-A |-|-a.jpg |-b.jpg
Here, I can exclude A and all of its file like that:
tree -I 'A'
I can also exclude a.jpg or b.jpg like that:
tree -I 'a.*|b.*'
But I can't exclude a.jpg like that:
tree -I 'A/a.jpg'
So, full path pattern matching seems broken.
Am I missing something or is this really impossible to have a fine subdirectory pattern matching with tree ?