Running watch on the command is returning unformatted output
rajula96reddy opened this issue · 8 comments
Description
When running watch on the cli command, like watch -n 60 football standings --league WC
which runs the command after every 60 seconds, just like refreshing, the output is
Versions
- NodeJS version: 6.14.3
- Football CLI version: 0.14.9
Error
Expected behaviour
Steps to recreate
- Run watch on top of football cli commands such as
watch football standings -l WC
People to notify
Help
Hi @rajula96reddy,
Thanks for opening this issue. I can see this happening because watch command is not ascii safe and breaks the table being rendered. This issue mostly pertains to how cli-table3
and watch
work. I would need to investigate it a little.
On a side note, since there are API rate limitations I wouldn't recommend using it with watch
command.
Hi @manrajgrover .
Thanks for the comment. Yeah given the API limitations I shouldn't be using watch
. But I can have a good enough time interval and still use it. It would be like a auto-refresh. Anyways, let me know if you any help with investigating. I would be happy to help you in resolving this issue.
@rajula96reddy Thanks for sharing the use case. Makes sense. If you can update the watch command in your first comment, it would help.
@DanielRuf has someone raised this issue before with cli-table3
?
@DanielRuf has someone raised this issue before with cli-table3?
We are cli-table2 API compatible and did not change the behavior (afaik).
@rajula96reddy Thanks for sharing the use case. Makes sense. If you can update the watch command in your first comment, it would help.
You are welcome.! I did update my first comment.
@rajula96reddy I meant watch -n 60 football npm install -g footballcli
. It doesn't look like the correct watch command.
@DanielRuf Thanks for looking into it :)
@manrajgrover I am sorry. I corrected it. 😅