This commit is contained in:
2026-02-07 14:58:13 -08:00
parent c8230cbb42
commit 60c2cc062c
9 changed files with 69 additions and 78 deletions

View File

@@ -72,13 +72,6 @@ class Download_File(Cmdlet):
SharedArgs.PROVIDER,
SharedArgs.PATH,
SharedArgs.QUERY,
# Prefer -path for output directory to match other cmdlets; keep -output for backwards compatibility.
CmdletArg(
name="-output",
type="string",
alias="o",
description="(deprecated) Output directory (use -path instead)",
),
QueryArg(
"clip",
key="clip",
@@ -2782,7 +2775,7 @@ class Download_File(Cmdlet):
# UX: In piped mode, allow a single positional arg to be the destination directory.
# Example: @1-4 | download-file "C:\\Users\\Me\\Downloads\\yoyo"
if (had_piped_input and raw_url and len(raw_url) == 1
and (not parsed.get("path")) and (not parsed.get("output"))):
and (not parsed.get("path"))):
candidate = str(raw_url[0] or "").strip()
low = candidate.lower()
looks_like_url = low.startswith((