1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
|
Description: adds the posibility to use an unpaged --help output
Origin: upstream, commit:fcee00ee
Bug-Debian: http://bugs.debian.org/424978
Author: David Lichteblau <david@lichteblau.com>
Index: ldapvi-1.7/arguments.c
===================================================================
--- ldapvi-1.7.orig/arguments.c
+++ ldapvi-1.7/arguments.c
@@ -115,7 +115,7 @@ enum ldapvi_option_numbers {
OPTION_NOQUESTIONS, OPTION_LDAPSEARCH, OPTION_LDAPMODIFY,
OPTION_LDAPDELETE, OPTION_LDAPMODDN, OPTION_LDAPMODRDN, OPTION_ADD,
OPTION_CONFIG, OPTION_READ, OPTION_LDAP_CONF, OPTION_BIND,
- OPTION_BIND_DIALOG
+ OPTION_BIND_DIALOG, OPTION_UNPAGED_HELP
};
static struct poptOption options[] = {
@@ -170,14 +170,17 @@ static struct poptOption options[] = {
{"ldapdelete", 0, 0, 0, OPTION_LDAPDELETE, 0, 0},
{"ldapmoddn", 0, 0, 0, OPTION_LDAPMODDN, 0, 0},
{"ldapmodrdn", 0, 0, 0, OPTION_LDAPMODRDN, 0, 0},
+ {"unpaged-help", 0, 0, 0, OPTION_UNPAGED_HELP, 0, 0},
{0, 0, 0, 0, 0}
};
+static int usage_pagerp = 1;
+
void
usage(int fd, int rc)
{
- if (fd == -1 && rc == 0 && isatty(1)) {
+ if (usage_pagerp && fd == -1 && rc == 0 && isatty(1)) {
int fd;
int pid = pipeview(&fd);
write(fd, USAGE, strlen(USAGE));
@@ -479,6 +482,9 @@ parse_argument(int c, char *arg, cmdline
case OPTION_LDAP_CONF:
result->profileonlyp = 0;
break;
+ case OPTION_UNPAGED_HELP:
+ usage_pagerp = 0;
+ break;
case 'p':
parse_configuration(arg, result, ctrls);
break;
Index: ldapvi-1.7/manual/manual.xml
===================================================================
--- ldapvi-1.7.orig/manual/manual.xml
+++ ldapvi-1.7/manual/manual.xml
@@ -718,6 +718,10 @@ wofuer was das doch gleich da?
suppress-configuration="suppress-configuration">
Print help on command line arguments.
</parameter>
+ <parameter long="unpaged-help" brief="Disable pager for --help">
+ Disable the use of a pager
+ for <a href="#parameter-rename"><tt>--help</tt></a>.
+ </parameter>
<parameter long="deleteoldrdn" brief="Delete the old RDN">
When changing the relative distinguished name to a new attribute
value, delete the old attribute value instead of keeping it.
Index: ldapvi-1.7/NEWS
===================================================================
--- ldapvi-1.7.orig/NEWS
+++ ldapvi-1.7/NEWS
@@ -1,3 +1,6 @@
+1.8 2007-mm-dd
+ - new configuration option `unpaged-help'
+
1.7 2007-05-05
- Fixed buffer overrun in home_filename(), thanks to Thomas Friebel.
|