Add argument root_path to start a search from somewhere else.

This commit is contained in:
voussoir 2020-02-15 18:03:04 -08:00
parent c58b851427
commit 845eebf40f

View file

@ -109,6 +109,7 @@ def search(
do_regex=False, do_regex=False,
line_numbers=False, line_numbers=False,
local_only=False, local_only=False,
root_path='.',
text=None, text=None,
): ):
terms = { terms = {
@ -158,6 +159,7 @@ def search(
if text is None: if text is None:
search_objects = spinal.walk_generator( search_objects = spinal.walk_generator(
root_path,
recurse=not local_only, recurse=not local_only,
yield_directories=True, yield_directories=True,
) )