Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[patch] configure default readnullcmd



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
? 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'     */


Messages sorted by: Reverse Date, Date, Thread, Author