f
This commit is contained in:
@@ -15,6 +15,7 @@ from ._shared import (
|
|||||||
get_field,
|
get_field,
|
||||||
normalize_hash,
|
normalize_hash,
|
||||||
)
|
)
|
||||||
|
from . import _shared as sh
|
||||||
from SYS.logger import log
|
from SYS.logger import log
|
||||||
from SYS.result_table import Table
|
from SYS.result_table import Table
|
||||||
from Store import Store
|
from Store import Store
|
||||||
@@ -557,6 +558,19 @@ class Get_Url(Cmdlet):
|
|||||||
# Check if user provided a URL pattern to search for
|
# Check if user provided a URL pattern to search for
|
||||||
search_pattern = parsed.get("url")
|
search_pattern = parsed.get("url")
|
||||||
|
|
||||||
|
# Support positional URL search or "url:" query prefix
|
||||||
|
if not search_pattern:
|
||||||
|
query = parsed.get("query")
|
||||||
|
if query:
|
||||||
|
if str(query).lower().startswith("url:"):
|
||||||
|
search_pattern = query[4:].strip()
|
||||||
|
elif self._looks_like_url_pattern(query) or (
|
||||||
|
"." in str(query) and len(str(query)) < 64
|
||||||
|
):
|
||||||
|
# If it looks like a domain or URL, and isn't a long hash,
|
||||||
|
# treat a positional query as a search pattern.
|
||||||
|
search_pattern = query
|
||||||
|
|
||||||
if search_pattern:
|
if search_pattern:
|
||||||
# URL search mode: find all files with matching URLs across stores
|
# URL search mode: find all files with matching URLs across stores
|
||||||
items, stores_searched = self._search_urls_across_stores(search_pattern, config)
|
items, stores_searched = self._search_urls_across_stores(search_pattern, config)
|
||||||
|
|||||||
Reference in New Issue
Block a user