axel-download-accelerator / axel

Lightweight CLI download accelerator
GNU General Public License v2.0
2.87k stars 258 forks source link

Feature/tty indicator to a #248

Closed HapCoderWei closed 4 years ago

HapCoderWei commented 4 years ago

Solve the issue #234 , and follow your advice. PS: I don't check if this pr can build on Windows platform..

ismaell commented 4 years ago

@shankar about txt2man issue on mac:

I just gave up, as there's no well-maintained XNU distributions. Maybe it can be reproduced 1:1 on FreeBSD...

ismaell commented 4 years ago

Don't try to fix the Mac OS X build.

HapCoderWei commented 4 years ago

Don't try to fix the Mac OS X build.

Why couldn't i to fix the Mac OS X build? I'm using a Mac mini, and i can build this project successfully on my machine. BTW, i install the txt2man on Mac by make install this package: https://github.com/mvertes/txt2man

ismaell commented 4 years ago

Don't try to fix the Mac OS X build.

Why couldn't i to fix the Mac OS X build? I'm using a Mac mini, and i can build this project successfully on my machine. BTW, i install the txt2man on Mac by make install this package: https://github.com/mvertes/txt2man

Oh, I didn't mean that you can't fix the build at all, it just shouldn't be part of this PR, you can make another PR for that. However, the proper fix is to figure out where homebrew is installing txt2man and add the directory to the PATH variable, like we do for GNU gettext.

HapCoderWei commented 4 years ago

Don't try to fix the Mac OS X build.

Why couldn't i to fix the Mac OS X build? I'm using a Mac mini, and i can build this project successfully on my machine. BTW, i install the txt2man on Mac by make install this package: https://github.com/mvertes/txt2man

Oh, I didn't mean that you can't fix the build at all, it just shouldn't be part of this PR, you can make another PR for that. However, the proper fix is to figure out where homebrew is installing txt2man and add the directory to the PATH variable, like we do for GNU gettext.

Get it, i will rollback the .travis.yml file, and open another pr to fix it. Thanks for you advice. This is my first experience on join a github project, so be free on feedback.😁😁

ismaell commented 4 years ago

Please rebase your changes on top of the mainline repo, don't merge, and compact everything into a single commit. The commit message should be imperative and it's better if it has the proper prefix, it should read something like:

conf: Change the default <...>

Also I insist on this change being a single line, and to depend on stdout instead of stdin, as we're not taking any input, and checking stdin would cause axel ...|tee logfile to not change behavior, which is wrong.

HapCoderWei commented 4 years ago

OK, I will give a pr after rebase my changes. I also tried to use stdout, but it couldn't deal with the case with axel ...| tee logfile. In this case, they have same output in both stdout and stdin, cause the stdout is pipeline, it will reset alternate_output=0 in text.c line 595. reference: https://rosettacode.org/wiki/Check_output_device_is_a_terminal#C

ismaell commented 4 years ago

Thanks.

giovanism commented 4 years ago

Great work! Thanks