-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(cli): add --quiet / -q option (#281)
* feat(cli): add --quiet / -q option Stops any successful output. Errors are still outputted. * refactor(cli): create output functions This commit creates stdout and stderr functions for outputting with respect to isQuiet and adds support for differing (easier to parse) messages if not connected to a TTY (eg. a pipe or process substitution) Additionally changes the 'No matching files.' message to output on stderr rather than on stdout as it was, which makes sense because this output represents erroneous usage. * fix(cli): ensure --quiet isn't used as a pattern --help and --version don't need to be checked because they exit the program before reaching this point. * fix(cli): add --quiet to the help * fix(cli): change stderr to not respect --quiet * fix(cli): change stdout to stderr in isTerminal * refactor(cli): simplify output functions * refactor(cli): remove call to array.filter * test: add tests for version, help, and quiet
- Loading branch information
Showing
5 changed files
with
999 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.