Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Add output helpers? #11

Open
killercup opened this issue Jan 21, 2018 · 5 comments
Open

Add output helpers? #11

killercup opened this issue Jan 21, 2018 · 5 comments

Comments

@killercup
Copy link
Owner

killercup commented Jan 21, 2018

What is a typical thing in a CLI app where you need to output stuff? What can we add to quicli that would make outputting information/data to the terminal really convenient?

E.g. https://docs.rs/indicatif and https://docs.rs/prettytable-rs

@vitiral
Copy link
Contributor

vitiral commented Jan 22, 2018

https://docs.rs/termstyle/0.1.1/termstyle/

this is my crate

@killercup
Copy link
Owner Author

Quoting @polarathene from #22:

How would you go about introducing progress visuals(common to see something like [=====---------]49%) or busy indicators(I've seen a project for this, maybe it was in zsh but should be portable to general CLI output from Rust).

I recall using a CLI app, Hashcat last year that would show several lines of what was going on followed by many lines of status of the computation that was updated and below that were some interactivity options along with shortcut keys that could pause/stop/save/etc the computation.

I guess these would both be a better story as async support develops further in the year, but a neat feature for quicli to be able to offer easily setting up? Item (key, description/label, function to call), view(list of items arranged horizontally I guess?)... or is that going too far into TUI land?

@mattgathu
Copy link
Contributor

You should also consider supporting coloured output, which is a thing with CLI apps. Perhaps using something like: https://docs.rs/console/0.6.1/console/

@killercup
Copy link
Owner Author

console makes sense to use when we are also using indicatif, as it is one of its dependencies anyway. Not sure if it supports Windows (or if we should care about that right now)

@vitiral
Copy link
Contributor

vitiral commented Feb 6, 2018

There are a LOT of different crates here and the ecosystem has far from stabilized IMO. I think it would be a mistake to include a specific library in quicli.

Some possible libraries:

  • ansi_term
  • console
  • termstyle
  • prettytable-rs
  • crossterm

I think this is a field where we actually need a conglomeration crate that combines other crates into a unified, testable API. That is what I hope termstyle to become but it is far from that point.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

3 participants