Skip to content

Commit

Permalink
remove help option
Browse files Browse the repository at this point in the history
Use the manual instead.
  • Loading branch information
mptre committed Dec 31, 2019
1 parent 2905675 commit 93a552b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 18 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ DISTFILES+= tests/key-unknown.t
DISTFILES+= tests/misc-match.t
DISTFILES+= tests/misc-realloc.t
DISTFILES+= tests/opt-d.t
DISTFILES+= tests/opt-h.t
DISTFILES+= tests/opt-k.t
DISTFILES+= tests/opt-o.t
DISTFILES+= tests/opt-q.t
Expand Down
4 changes: 1 addition & 3 deletions pick.1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.Nd fuzzy select anything
.Sh SYNOPSIS
.Nm
.Op Fl dhKoSXx
.Op Fl dKoSXx
.Op Fl q Ar query
.Sh DESCRIPTION
The
Expand All @@ -28,8 +28,6 @@ Input lines will be split into two parts by the last occurrence of
.Ev IFS .
Both parts will be displayed but only the first part will be used when
searching.
.It Fl h
Output a help message and exit.
.It Fl K
Disable toggling of keypad transmit mode.
Useful when running
Expand Down
18 changes: 7 additions & 11 deletions pick.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static const char *tty_parm1(char *, int);
static int tty_putc(int);
static void tty_restore(int);
static void tty_size(void);
static __dead void usage(int);
static __dead void usage(void);
static int xmbtowc(wchar_t *, const char *);

static struct termios tio;
Expand Down Expand Up @@ -115,13 +115,11 @@ main(int argc, char *argv[])
if (pledge("stdio tty rpath wpath cpath", NULL) == -1)
err(1, "pledge");

while ((c = getopt(argc, argv, "dhoq:KSxX")) != -1)
while ((c = getopt(argc, argv, "doq:KSxX")) != -1)
switch (c) {
case 'd':
descriptions = 1;
break;
case 'h':
usage(0);
case 'K':
use_keypad = 0;
break;
Expand All @@ -148,12 +146,12 @@ main(int argc, char *argv[])
use_alternate_screen = 0;
break;
default:
usage(1);
usage();
}
argc -= optind;
argv += optind;
if (argc > 0)
usage(1);
usage();

if (query == NULL) {
query_size = 64;
Expand Down Expand Up @@ -185,19 +183,17 @@ main(int argc, char *argv[])
}

__dead void
usage(int status)
usage(void)
{
fprintf(stderr, "usage: pick [-dhKoSXx] [-q query]\n"
" -h output this help message and exit\n"
fprintf(stderr, "usage: pick [-dKoSXx] [-q query]\n"
" -K disable toggling of keypad transmit mode\n"
" -S disable sorting\n"
" -d read and display descriptions\n"
" -o output description of selected on exit\n"
" -x enable alternate screen\n"
" -X disable alternate screen\n"
" -q query supply an initial search query\n");

exit(status);
exit(1);
}

char *
Expand Down
1 change: 0 additions & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ TESTS+= key-unknown.t
TESTS+= misc-match.t
TESTS+= misc-realloc.t
TESTS+= opt-d.t
TESTS+= opt-h.t
TESTS+= opt-k.t
TESTS+= opt-o.t
TESTS+= opt-q.t
Expand Down
2 changes: 0 additions & 2 deletions tests/opt-h.t

This file was deleted.

0 comments on commit 93a552b

Please sign in to comment.