vfind command --exclude

This commit is contained in:
Amber 2024-01-31 12:02:13 +01:00
parent 8e174308a3
commit 02b1d3916f
1 changed files with 7 additions and 1 deletions

View File

@ -10,9 +10,15 @@ if __name__ == '__main__':
pattern = cmd_args.pattern pattern = cmd_args.pattern
show_children_nodes = cmd_args.show_children_nodes show_children_nodes = cmd_args.show_children_nodes
# opts for generatign the tree
opts = {
'items_to_exclude' : cmd_args.exclude or [],
}
# opts for find
find_opts = { find_opts = {
'dont_show_children_nodes': not show_children_nodes 'dont_show_children_nodes': not show_children_nodes
} }
ntree = NerdTreeFind(path) ntree = NerdTreeFind(path, opts=opts)
ntree.find(pattern, opts=find_opts) ntree.find(pattern, opts=find_opts)