This commit is contained in:
nose
2025-12-19 15:20:08 -08:00
parent d3edd6420c
commit 900a37e210
13 changed files with 729 additions and 32 deletions

View File

@@ -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: