ref: b7306bef352fc0796d84a5ef0bd5a301629adfe9
parent: 976b2c3767f139177754bdc7ef7069d535ff7325
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Fri Jul 23 07:09:32 EDT 2021
print a usage error if no options were specified
--- a/nvi.c
+++ b/nvi.c
@@ -76,6 +76,10 @@
if(argc != 1)
usage();
+ if(cmd != Cinfo && ov == nil && oa == nil){
+ fprint(2, "at least one option (-i, -a, -v) has be specified\n");
+ threadexitsall("usage");
+ }
vid = argv[0];
if(strncmp(argv[0], "http", 4) == 0){
if(strstr(argv[0], "youtu") != nil && (vid = strrpbrk(argv[0], "/=")) != nil)