Expanded lesskey usage (#948597)

This commit is contained in:
Fridolin Pokorny 2013-05-07 14:44:46 +02:00
parent 3f5d948810
commit 72dfd3f635
2 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,37 @@
diff -upr less-458_orig/lesskey.c less-458_work/lesskey.c
--- less-458_orig/lesskey.c 2013-05-07 14:03:52.062104533 +0200
+++ less-458_work/lesskey.c 2013-05-07 11:21:10.881991855 +0200
@@ -217,7 +217,15 @@ extern char version[];
void
usage()
{
- fprintf(stderr, "usage: lesskey [-o output] [input]\n");
+ fprintf(stderr, "usage: lesskey [-o output] [input]\n\n");
+ fprintf(stderr,
+ " -o output\t- specify output file, otherwise $HOME/.less is used\n");
+ fprintf(stderr,
+ " -i input\t- specify input file, otherwise standard input is used\n");
+ fprintf(stderr,
+ " -V\t\t- print lesskey version\n");
+ fprintf(stderr,
+ " -h\t\t- print this help\n");
exit(1);
}
@@ -307,6 +315,8 @@ parse_args(argc, argv)
break;
case 'o':
outfile = &argv[0][2];
+ case 'h':
+ goto opt_h;
opt_o:
if (*outfile == '\0')
{
@@ -319,6 +329,7 @@ parse_args(argc, argv)
opt_V:
printf("lesskey version %s\n", version);
exit(0);
+ opt_h:
default:
usage();
}

View File

@ -16,6 +16,7 @@ Patch6: less-436-manpage-add-old-bot-option.patch
Patch7: less-436-help.patch Patch7: less-436-help.patch
Patch8: less-458-lessecho-usage.patch Patch8: less-458-lessecho-usage.patch
Patch9: less-458-less-filters-man.patch Patch9: less-458-less-filters-man.patch
Patch10: less-458-lesskey-usage.patch
URL: http://www.greenwoodsoftware.com/less/ URL: http://www.greenwoodsoftware.com/less/
Requires: groff-base Requires: groff-base
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
@ -41,6 +42,7 @@ files, and you'll use it frequently.
%patch7 -p1 -b .help %patch7 -p1 -b .help
%patch8 -p1 -b .lessecho-usage %patch8 -p1 -b .lessecho-usage
%patch9 -p1 -b .less-filters-man %patch9 -p1 -b .less-filters-man
%patch10 -p1 -b .lesskey-usage
autoreconf autoreconf
chmod -R a+w * chmod -R a+w *
@ -72,6 +74,7 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
- Expanded lessecho usage (#948597) - Expanded lessecho usage (#948597)
- Added lessfilter info to man (#948597) - Added lessfilter info to man (#948597)
- Expanded lesskey usage (#948597)
* Thu Apr 11 2013 Fridolin Pokorny <fpokorny@redhat.com> - 458-2 * Thu Apr 11 2013 Fridolin Pokorny <fpokorny@redhat.com> - 458-2
- Added gpg support to lesspipe.sh (#885122) - Added gpg support to lesspipe.sh (#885122)