On Wed, May 30, 2007 at 11:24:21AM +0200, martin f krafft wrote:
> also sprach David Lichteblau <[EMAIL PROTECTED]> [2007.05.18.1439 +0200]:
>> As a user, you can either pipe through a pager if the program does not
>> do that automatically, or you can pipe through cat to avoid the pager
>> for programs that default to using one. So for both implementations,
>> users can force the other output style if they want, reducing this issue
>> to the question of getting the default right.
>
> This is backwards.
I thought a bit about it, and I think not expecing getting a piped
output is still more the default these days, and the short strawpoll
showed that quite some people feel better with adding the pager themself
when needed. Especially since ldapvi is rather a highlevel tool and not
really aimed at total clueless users I got convinced to deactivate the
paged output for the Debian package - I hope you won't stop responding
to me, David, because of that decision. ;)
Btw., Martin Krafft came up with a short patch that would mean to not
have to patch the file:
#v+
--- arguments.c.orig 2007-05-30 11:32:55.000000000 +0200
+++ arguments.c 2007-05-30 11:33:54.000000000 +0200
@@ -173,11 +173,14 @@
{0, 0, 0, 0, 0}
};
+#ifndef USE_PAGER
+#define USE_PAGER 1
+#endif
void
usage(int fd, int rc)
{
- if (fd == -1 && rc == 0 && isatty(1)) {
+ if (USE_PAGER && fd == -1 && rc == 0 && isatty(1)) {
int fd;
int pid = pipeview(&fd);
write(fd, USAGE, strlen(USAGE));
#v-
Would be nice if you could apply it - maybe others might want to build
with -DUSE_PAGER=0 too. (and I won't need to keep the patch hanging
around *gg*)
So long,
Alfie
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]