Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input csview command without parameter will get no repsonse in terminal #4

Closed
3 of 6 tasks
wangyongf opened this issue Sep 20, 2020 · 1 comment
Closed
3 of 6 tasks
Labels

Comments

@wangyongf
Copy link

Check list

  • I have read through the README
  • I have searched through the existing issues

Environment info

  • OS
    • Linux
    • Mac OS X
    • Windows
    • Others:

Version

csview v0.3.4

Problem / Steps to reproduce

Input csview command without parameter will get no repsonse in terminal. It seems something wrong? I think the csview cli should check the input parameters and if no input parameter are given (eg, only input csview in terminal), error message should be given for better user experience.

@wfxr
Copy link
Owner

wfxr commented Sep 20, 2020

Hi @wangyongf This is an expected behavior. csview supports reading data from stdin. If run csview without file parameter, it will read the stdin (like cat or bat etc.).

Case 1:

$ csview
a,b,c
1,2,3
4,5,6 (press ctrl-d here will output the following)
+---+---+---+
| a | b | c |
+---+---+---+
| 1 | 2 | 3 |
| 4 | 5 | 6 |
+---+---+---+

Case 2:

$ printf 'a,b,c\n1,2,3' | csview
+---+---+---+
| a | b | c |
+---+---+---+
| 1 | 2 | 3 |
+---+---+---+

@wfxr wfxr added the stale label Sep 28, 2020
@wfxr wfxr closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants