commit faa0a5d6d6471dfbab401b20819a416f5e0bb553
parent c51d624e68e3487772398aaf9ce1f0f7a43099e5
Author: Ed van Bruggen <edvb54@gmail.com>
Date: Sat, 25 Mar 2017 19:53:13 -0700
Add -i option to force prompts
Diffstat:
3 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/README.md b/README.md
@@ -2,7 +2,7 @@
## SYNOPSIS
-`nt` [**-Dlvy**] [**-f** *FILE*] [**-e** *NOTE*] [**-d** *NOTE*] [**-s** *SEARCH*] [**-t** [*TAG*]] [**-n** *NUM* | **-NUM**] [*NOTE* ...]
+`nt` [**-Dilvy**] [**-f** *FILE*] [**-e** *NOTE*] [**-d** *NOTE*] [**-s** *SEARCH*] [**-t** [*TAG*]] [**-n** *NUM* | **-NUM**] [*NOTE* ...]
## DESCRIPTION
@@ -27,6 +27,9 @@ by prefixing the note with a tag followed by a colon. For example a note
**-f** *FILE*
Load *FILE* instead of default one
+**-i**
+ Force prompt to confirm action
+
**-l**
List notes
diff --git a/nt.1 b/nt.1
@@ -4,7 +4,7 @@
nt \- simple note taker
.SH SYNOPSIS
.PP
-\fB\fCnt\fR [\fB\-Dlvy\fP] [\fB\-f\fP \fIFILE\fP] [\fB\-e\fP \fINOTE\fP] [\fB\-d\fP \fINOTE\fP] [\fB\-s\fP \fISEARCH\fP] [\fB\-t\fP [\fITAG\fP]] [\fB\-n\fP \fINUM\fP | \fB\-NUM\fP] [\fINOTE\fP ...]
+\fB\fCnt\fR [\fB\-Dilvy\fP] [\fB\-f\fP \fIFILE\fP] [\fB\-e\fP \fINOTE\fP] [\fB\-d\fP \fINOTE\fP] [\fB\-s\fP \fISEARCH\fP] [\fB\-t\fP [\fITAG\fP]] [\fB\-n\fP \fINUM\fP | \fB\-NUM\fP] [\fINOTE\fP ...]
.SH DESCRIPTION
.PP
Simple note taker for the command line. To take a note simply run the command
@@ -27,6 +27,9 @@ by prefixing the note with a tag followed by a colon. For example a note
\fB\-f\fP \fIFILE\fP
Load \fIFILE\fP instead of default one
.PP
+\fB\-i\fP
+ Force prompt to confirm action
+.PP
\fB\-l\fP
List notes
.PP
diff --git a/nt.c b/nt.c
@@ -336,7 +336,7 @@ cleanup(void)
void
usage(void)
{
- die("usage: %s [-Dlvy] [-f FILE] [-e NOTE] [-d NOTE]\n"
+ die("usage: %s [-Dilvy] [-f FILE] [-e NOTE] [-d NOTE]\n"
" [-s SEARCH] [-t [TAG]] [-n NUM | -NUM] [NOTE ...]", argv0);
}
@@ -359,6 +359,9 @@ main(int argc, char *argv[])
fname = EARGF(usage());
neednt = 0;
break;
+ case 'i':
+ yes = 0;
+ break;
case 'l':
mode = nt_list_all;
neednt = 0;