aboutsummaryrefslogtreecommitdiff
path: root/src/lib/arg.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/arg.c')
-rw-r--r--src/lib/arg.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/arg.c b/src/lib/arg.c
index 39bc816..3db3e8f 100644
--- a/src/lib/arg.c
+++ b/src/lib/arg.c
@@ -11,6 +11,7 @@ void help(void) {
printf("options:\n"
"\t-c, --color\t toggle whether to print color or not\n"
"\t-n, --lines\t toggle whether to print line numbers or not\n"
+ "\t-t, --headers\t toggle whether to print file headers or not\n"
"\t-b, --binary\t toggle whether to force the data to be treated as "
"binary or not\n"
"\t-V, --version\t show program version\n"
@@ -40,6 +41,11 @@ void parselongarg(char *arg) {
return;
}
+ if (strcmp(arg, "--headers")) {
+ conf.headers = !conf.headers;
+ return;
+ }
+
if (strcmp(arg, "--binary") == 0) {
conf.force_binary = !conf.force_binary;
return;
@@ -71,6 +77,9 @@ void parseshortarg(char *arg) {
case 'n':
conf.lines = !conf.lines;
break;
+ case 't':
+ conf.headers = !conf.headers;
+ break;
case 'b':
conf.force_binary = !conf.force_binary;
break;