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

CLI version #41

Closed
clarfon opened this Issue Mar 29, 2018 · 6 comments

Comments

Projects
None yet
3 participants
@clarfon
Copy link

clarfon commented Mar 29, 2018

Considering how we have projects like ripgrep, exa, and fd which aim to oxidise common shell utils, it would be great to create an alternative to the wc command that uses bytecount (I vote to name the binary ct, short for count).

Considering how the hard work has already been done for the actual counting, all that really would have to be done is parse command-line arguments with clap or similar. While we don't have an actual "word" counting functionality, 99% of the time I see wc is via wc -l anyway, and it seems pretty straightforward to make a binary that will do this with bytecount.

@llogiq

This comment has been minimized.

Copy link
Owner

llogiq commented Mar 30, 2018

Counter-proposal: Let's call it lc for line-count.

@clarfon

This comment has been minimized.

Copy link
Author

clarfon commented Mar 30, 2018

Counter-counter-proposal, it can count UTF-8 chars too.

@Veedrac

This comment has been minimized.

Copy link
Collaborator

Veedrac commented Apr 2, 2018

Is there really a need for a better wc though?

@clarfon

This comment has been minimized.

Copy link
Author

clarfon commented Apr 2, 2018

@Veedrac not really, but it's still a cool thing to make

@llogiq

This comment has been minimized.

Copy link
Owner

llogiq commented Apr 7, 2018

So I think we'd want to use the glob crate for file retrieval. We should accept two arguments: -l (default) or -c (UTF-8 chars) and a glob.

@Veedrac

This comment has been minimized.

Copy link
Collaborator

Veedrac commented Jan 8, 2019

Thanks to Freaky for making this!

https://github.com/Freaky/cw

@Veedrac Veedrac closed this Jan 8, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.