[fix] resolve -p short option collision between --proxy and --password#373
Conversation
The Options section assigned -p to both --proxy and --password. Docopt resolves the conflict by taking the first match, so -p <val> silently mapped to --proxy and the -p alias for --password never worked. Move --proxy to -x, following the curl convention (curl -x/--proxy), which frees -p for exclusive use as the --password alias. Update the README usage block to match. Add parser tests covering both -x and -p to guard against regression. Note: scripts passing -p <proxy-url> must switch to -x or --proxy. Co-authored-by: Codex (gpt-5.5) <codex@openai.com>
|
I'm not opposed to merging this however I must ask why this is needed? You're asking us to break old functionality. Now, my most important user, IA themselves, this wouldn't effect them because they don't need a proxy to upload, what I'm concerned about is power users who use those options. It would introduce a break in their scripts. Another thing sort of related to this PR is I want to come back to eliminating short flags. Perhaps for now, use Nice work on test uploads it wasn't needed, but thanks. |
|
@vxbinaca I like this change from a long term maintainability and usability perspective, but I agree with your points about existing scripting functionality. Perhaps we can institute a "brownout" and let folks know in the next release by raising a warning if a proxy URL is used with the |
|
Yeah. Next release let's squash short flags. Or by August. |
|
I'm pretty sure this was made using AI |
|
Right but the code is sound, I just don't like the approach. Let's remove short flags it's more consistent. We've adopted longer flags for So Edit: And his problem that caused the PR, it's real. The flags collide. I know why I didn't notice this, because I prefer to use cookies and don't use a proxy. |
|
I'm merging this and cutting a new version for the time being but I want to circle back to killing off short flags. |
|
Thanks @vxbinaca! |
I should have included a disclaimer in the PR, my apologies. This was my first contribution to a project and I should have mentioned it. On second thought, I would have been better off opening a bug report to discuss it. I'll do better in the future. |
|
I don't think I'll be accepting any more AI commits, because they have questionable copyright. |
Summary
The
Optionssection in the CLI docstring assigned-pto both--proxyand--password. Docopt resolves the conflict by taking thefirst match, so
-p <val>silently mapped to--proxyand the-palias for
--passwordnever worked.This PR moves
--proxyto-x, following thecurlconvention(
curl -x/curl --proxy), which frees-pfor exclusive use as the--passwordalias.Changes
--proxyshort option from-pto-xin the CLI docstring.-xsets--proxyand-psets--password(and not--proxy), guarding against regression.Breaking change
Scripts or shell aliases that passed
-p <proxy-url>for proxy mustswitch to
-x <proxy-url>or the long form--proxy <proxy-url>.Testing
Test upload
The fix does not affect functionality of TubeUp:
https://archive.org/details/youtube-1CIMGTO6aFc
https://archive.org/details/youtube-HaQiFAWxDxM