vfind command
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
from colors import RED, YELLOW, GREEN, CYAN , BLUE, PURPLE
|
||||
from tree import NerdTree
|
||||
from src.colors import RED, YELLOW, GREEN, CYAN , BLUE, PURPLE
|
||||
from src.tree import NerdTree
|
||||
|
||||
class NerdTreeFind(NerdTree):
|
||||
'''
|
||||
@ -8,11 +8,12 @@ class NerdTreeFind(NerdTree):
|
||||
@param opts dict: the opts for the tree representation
|
||||
'''
|
||||
|
||||
def __init__(self, startpath, opts={}):
|
||||
def __init__(self, startpath, opts={}, find_opts={}):
|
||||
self.item_name = ''
|
||||
self.results = []
|
||||
## computed tree for find
|
||||
self.json_tree_find = {}
|
||||
self.find_opts = find_opts
|
||||
NerdTree.__init__(self, startpath, opts=opts)
|
||||
|
||||
def find_node_recursively(self, node):
|
||||
@ -63,7 +64,7 @@ class NerdTreeFind(NerdTree):
|
||||
'''
|
||||
results = self.find_node()
|
||||
|
||||
dont_show_children_nodes = self.find_opts['dont_show_children_nodes'] if self.find_opts.get('dont_show_children_nodes') else False
|
||||
dont_show_children_nodes = self.find_opts['dont_show_children_nodes'] if self.find_opts.get('dont_show_children_nodes') is not None else False
|
||||
|
||||
if not results:
|
||||
return {}
|
||||
|
Reference in New Issue
Block a user