manrajgrover / football-cli

⚽ Command line interface for Hackers who love football
MIT License
1.07k stars 80 forks source link

Running watch on the command is returning unformatted output #35

Open rajula96reddy opened 6 years ago

rajula96reddy commented 6 years ago

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 screenshot from 2018-06-27 15-55-58

Versions

Error

Expected behaviour

Steps to recreate

People to notify

SLVER5111q commented 6 years ago

Help

manrajgrover commented 6 years ago

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.

rajula96reddy commented 6 years ago

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.

manrajgrover commented 6 years ago

@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 commented 6 years ago

@DanielRuf has someone raised this issue before with cli-table3?

We are cli-table2 API compatible and did not change the behavior (afaik).

rajula96reddy commented 6 years ago

@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.

manrajgrover commented 6 years ago

@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 :)

rajula96reddy commented 6 years ago

@ManrajGrover I am sorry. I corrected it. :sweat_smile: