piotrmurach / tty-command

Execute shell commands with pretty output logging and capture stdout, stderr and exit status.
https://ttytoolkit.org
MIT License
400 stars 34 forks source link

Add silent printer to allow suppressing command echoing #1

Closed piotrmurach closed 8 years ago

piotrmurach commented 8 years ago

Provide option for TTY::Command.new to suppress output logging.

gurgeous commented 8 years ago

It's probably also worth considering what happens in the common case here. Often these scripts end up running something like 50 commands in a row, including many that don't output anything. I wonder if we could make the output a bit quieter in general? Like only include logging if requested, or if there is actual output to display.

piotrmurach commented 8 years ago

We could investigate different logging levels, or even rely on the Ruby standard logger to implement some of this. Also, we could provide different printer that may just show dot/tick when successful, kind of like rspec does with dots vs documentation formatters.

piotrmurach commented 8 years ago

Added rspec like progress printer.

piotrmurach commented 8 years ago

Added :null printer type which won't output anything, this is as silent as it gets.