[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: wget2 | Similarity of --output-file/-o and --output-document/-O (#67
From: |
Mitch C (@MitchC) |
Subject: |
Re: wget2 | Similarity of --output-file/-o and --output-document/-O (#675) |
Date: |
Wed, 28 Aug 2024 03:35:10 +0000 |
Mitch C commented: https://gitlab.com/gnuwget/wget2/-/issues/675#note_2078256154
Problem is again backwards compat, users are going to expect clobbering by
default would certainly break user expectations (especially as no-clobber
doesn't generate error necessarily so the user may not know the output isn't
where they expected it).
The good news is wget can load defaults from the wget2rc file so you could
disable clobbering by default. Otherwise your wrapper script could likely do
a few other things that might work like, if your -o files generally end in
"log" and you call wget2 with -o but not a file ending in log, to confirm
before executing the command if that file exists. Alternatively your log
files are probably tiny in comparison to downloads so if you do -o and the file
exists and it is bigger than 2K or something to throw an error. Further, as
this likely is only an interactive session issue just having an alias in your
profile for that script will prevent it from causing an issue with anything
else calling wget2.
Back compat and option names are a pain, I think one place --log-file certainly
strives too is autocomplete quick to see what option for what. I may or may
not have actually renamed --output-document to --output-log for my own visual
help with using tab completion:). The good news is one doesn't even need to
wait for wget2 to add --log-file (if it does get added as a new alias) just use
a wrapper script to do it on your own currently.
--
Reply to this email directly or view it on GitLab:
https://gitlab.com/gnuwget/wget2/-/issues/675#note_2078256154
You're receiving this email because of your account on gitlab.com.