Add argument root_path to start a search from somewhere else.
This commit is contained in:
parent
c58b851427
commit
845eebf40f
1 changed files with 2 additions and 0 deletions
|
@ -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,
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue