dfd
This commit is contained in:
@@ -68,6 +68,23 @@ class Download_File(Cmdlet):
|
||||
if isinstance(raw_url, str):
|
||||
raw_url = [raw_url]
|
||||
|
||||
# Allow comma-separated URLs in a single argument.
|
||||
# Example: download-file "https://a.pdf,https://b.pdf"
|
||||
expanded_urls: List[str] = []
|
||||
for u in (raw_url or []):
|
||||
if u is None:
|
||||
continue
|
||||
s = str(u).strip()
|
||||
if not s:
|
||||
continue
|
||||
if "," in s:
|
||||
parts = [p.strip() for p in s.split(",")]
|
||||
expanded_urls.extend([p for p in parts if p])
|
||||
else:
|
||||
expanded_urls.append(s)
|
||||
if expanded_urls:
|
||||
raw_url = expanded_urls
|
||||
|
||||
# If no URL args were provided, fall back to piped results (provider items)
|
||||
piped_items: List[Any] = []
|
||||
if not raw_url:
|
||||
|
||||
Reference in New Issue
Block a user