axel
axel copied to clipboard
.netrc support
From Debian[1]:
Axel should try to use the .netrc file when trying to login to an FTP server.
[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=127074
Regards,
Eriberto
I would like to try to implement this feature, as I already have implemented a (somewhat naive, but working) simple .netrc
parser in a few lines. But before I finish that, I would like the feedback on some points:
- I thought about only enabling
.netrc
parsing through a command-line option, not as a default behavior, as not to break the existing user experience, scripts, etc. What do you think about it? - The long option could be something along the lines of
--netrc[=filename]
. If the option was used, it would parse the$HOME/.netrc
file or an optional user-provided filename. I don't know which letter would be more appropriate for the short option. Suggestions are welcome. - Other doubt is whether the code should be compiled by default along the rest of axel, or be conditionally compiled using the pre-processor. I don't think it will have such an impact on code size, but I wanted to know the opinions on it.
Thanks in advance.
I submitted a PR that implements the feature. I intend to enhance some points of the implementation in the future, but for now it seemed to work for me. Tests are welcome.
I purposefully didn't change any of the .po files because of my ignorance of internationalization issues, so the new messages added to print_help() do not appear at the moment, in spite of the options being functional.