ncplayer: suppress banners when given 'q' #1342

This commit is contained in:
nick black 2021-02-09 18:46:21 -05:00
parent 3e39b6c0a3
commit 898f34f924
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC
2 changed files with 6 additions and 0 deletions

View File

@ -68,6 +68,9 @@ to resume.
# NOTES
If you're looking for a fast, inline image viewer for the shell, try using
**ncplayer -k -t0 -q**.
Optimal display requires a terminal advertising the **rgb** terminfo(5)
capability, or that the environment variable **COLORTERM** is defined to
**24bit** (and that the terminal honors this variable), along with a

View File

@ -273,6 +273,9 @@ auto main(int argc, char** argv) -> int {
auto nonopt = handle_opts(argc, argv, ncopts, &quiet, &timescale, &scalemode,
&blitter, &displaytime, &loop);
ncopts.flags |= NCOPTION_INHIBIT_SETLOCALE;
if(quiet){
ncopts.flags |= NCOPTION_SUPPRESS_BANNERS;
}
NotCurses nc{ncopts};
if(!nc.can_open_images()){
nc.stop();