zsh-workers
 help / color / mirror / code / Atom feed
* [patch] configure default readnullcmd
@ 2008-04-26  0:14 Marc Chantreux
  0 siblings, 0 replies; only message in thread
From: Marc Chantreux @ 2008-04-26  0:14 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 370 bytes --]

hello workers, 

this is my attempt to fix the debian bug
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=477722

the problem is that default pager on debian is "pager". zsh default pager
is "more" and this is hardcoded.

this patch adds an option in configure.ac 

hth,
marc

-- 
Marc Chantreux
BibLibre, expert en logiciels libres pour l'info-doc
http://biblibre.com

[-- Attachment #2: patch --]
[-- Type: text/x-diff, Size: 1451 bytes --]

? patch
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.98
diff -u -r1.98 configure.ac
--- configure.ac	23 Apr 2008 08:40:02 -0000	1.98
+++ configure.ac	26 Apr 2008 00:04:57 -0000
@@ -334,6 +334,19 @@
 [AC_DEFINE(MAX_FUNCTION_DEPTH, 1000)]
 )
 
+ifdef([default_readnullcmd],[undefine([default_readnullcmd])])dnl
+AH_TEMPLATE([DEFAULT_READNULLCMD],
+[Define default pager used by readnullcmd])
+AC_ARG_ENABLE(readnullcmd,
+AC_HELP_STRING([--enable-readnullcmd=PAGER], [pager used when READNULLCMD is not set]),
+[if test x$enableval = xyes; then
+  AC_DEFINE(DEFAULT_READNULLCMD,"more")
+elif test x$enableval != xno; then
+  AC_DEFINE_UNQUOTED(DEFAULT_READNULLCMD,"$enableval")
+fi],
+[AC_DEFINE(DEFAULT_READNULLCMD,"more")]
+)
+
 dnl Do you want to look for pcre support?
 AC_ARG_ENABLE(pcre,
 AC_HELP_STRING([--enable-pcre],
Index: Src/init.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/init.c,v
retrieving revision 1.81
diff -u -r1.81 init.c
--- Src/init.c	3 Apr 2008 15:20:23 -0000	1.81
+++ Src/init.c	26 Apr 2008 00:05:00 -0000
@@ -806,7 +806,7 @@
     term  = ztrdup("");
 
     nullcmd     = ztrdup("cat");
-    readnullcmd = ztrdup("more");
+    readnullcmd = ztrdup(DEFAULT_READNULLCMD);
 
     /* We cache the uid so we know when to *
      * recheck the info for `USERNAME'     */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-26  0:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-26  0:14 [patch] configure default readnullcmd Marc Chantreux

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).