notcurses-view: support 'V' for version out #1266

This commit is contained in:
nick black 2020-12-31 02:28:32 -05:00
parent 0bcb107ae6
commit 4616d60ae9
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

View File

@ -179,11 +179,14 @@ auto handle_opts(int argc, char** argv, notcurses_options& opts, bool* quiet,
*scalemode = NCSCALE_STRETCH; *scalemode = NCSCALE_STRETCH;
*displaytime = -1; *displaytime = -1;
int c; int c;
while((c = getopt(argc, argv, "hql:d:s:b:t:m:kL")) != -1){ while((c = getopt(argc, argv, "Vhql:d:s:b:t:m:kL")) != -1){
switch(c){ switch(c){
case 'h': case 'h':
usage(std::cout, argv[0], EXIT_SUCCESS); usage(std::cout, argv[0], EXIT_SUCCESS);
break; break;
case 'V':
printf("notcurses-view version %s\n", notcurses_version());
exit(EXIT_SUCCESS);
case 'q': case 'q':
*quiet = true; *quiet = true;
break; break;