From Anon Ymous:

Partially restore the "crt" variable: if set, the [pP]rint and [tT]ype
commands invoke the PAGER making them identical to the [pP]age and
[mM]more commands.  Its value is now ignored.  If anyone really
objects, I will do my best to restore the old behavior, but it really
doesn't fit very well into the current paging architecture.
This commit is contained in:
christos 2006-12-06 16:26:24 +00:00
parent fba4e06d1b
commit 6e70cbd24e
4 changed files with 27 additions and 25 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: cmdtab.c,v 1.16 2006/11/28 18:45:32 christos Exp $ */
/* $NetBSD: cmdtab.c,v 1.17 2006/12/06 16:26:24 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)cmdtab.c 8.2 (Berkeley) 4/20/95";
#else
__RCSID("$NetBSD: cmdtab.c,v 1.16 2006/11/28 18:45:32 christos Exp $");
__RCSID("$NetBSD: cmdtab.c,v 1.17 2006/12/06 16:26:24 christos Exp $");
#endif
#endif /* not lint */
@ -52,6 +52,7 @@ __RCSID("$NetBSD: cmdtab.c,v 1.16 2006/11/28 18:45:32 christos Exp $");
#define A (C_PIPE_SHELL | C_PIPE_PAGER)
#define C (C_PIPE_SHELL | C_PIPE_CRT)
#define N (C_PIPE_SHELL)
/*
@ -63,10 +64,10 @@ __RCSID("$NetBSD: cmdtab.c,v 1.16 2006/11/28 18:45:32 christos Exp $");
const struct cmd cmdtab[] = {
{ "next", next, A, CMP(n) NDMLIST, 0, MMNDEL },
{ "alias", group, A, CMP(A) M|RAWLIST, 0, 1000 },
/* R */ { "print", type, N, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "Print", Type, N, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "type", type, N, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "Type", Type, N, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "print", type, C, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "Print", Type, C, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "type", type, C, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "Type", Type, C, CMP(n) MSGLIST, 0, MMNDEL },
{ "visual", visual, 0, CMP(n) I|MSGLIST, 0, MMNORM },
/* R */ { "top", top, A, CMP(n) MSGLIST, 0, MMNDEL },
/* R */ { "touch", stouch, 0, CMP(n) W|MSGLIST, 0, MMNDEL },

View File

@ -1,4 +1,4 @@
/* $NetBSD: def.h,v 1.22 2006/11/28 18:45:32 christos Exp $ */
/* $NetBSD: def.h,v 1.23 2006/12/06 16:26:24 christos Exp $ */
/*
* Copyright (c) 1980, 1993
* The Regents of the University of California. All rights reserved.
@ -28,7 +28,7 @@
* SUCH DAMAGE.
*
* @(#)def.h 8.4 (Berkeley) 4/20/95
* $NetBSD: def.h,v 1.22 2006/11/28 18:45:32 christos Exp $
* $NetBSD: def.h,v 1.23 2006/12/06 16:26:24 christos Exp $
*/
/*
@ -188,7 +188,8 @@ struct cmd {
int (*c_func)(void *); /* Implementor of the command */
int c_pipe; /* Pipe output through the pager */
# define C_PIPE_PAGER 1 /* enable use of pager */
# define C_PIPE_SHELL 2 /* enable shell pipes */
# define C_PIPE_CRT 2 /* use the pager if CRT is defined */
# define C_PIPE_SHELL 4 /* enable shell pipes */
#ifdef USE_EDITLINE
const char *c_complete; /* String describing completion */
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex.c,v 1.30 2006/11/28 18:45:32 christos Exp $ */
/* $NetBSD: lex.c,v 1.31 2006/12/06 16:26:24 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)lex.c 8.2 (Berkeley) 4/20/95";
#else
__RCSID("$NetBSD: lex.c,v 1.30 2006/11/28 18:45:32 christos Exp $");
__RCSID("$NetBSD: lex.c,v 1.31 2006/12/06 16:26:24 christos Exp $");
#endif
#endif /* not lint */
@ -368,7 +368,8 @@ setup_piping(char *cmdline, int c_pipe)
}
}
else if (value(ENAME_PAGER_OFF) == NULL && c_pipe & C_PIPE_PAGER) {
else if (value(ENAME_PAGER_OFF) == NULL && (c_pipe & C_PIPE_PAGER ||
(c_pipe & C_PIPE_CRT && value(ENAME_CRT) != NULL))) {
const char *pager;
pager = value(ENAME_PAGER);
if (pager == NULL || *pager == '\0')

View File

@ -1,4 +1,4 @@
.\" $NetBSD: mail.1,v 1.41 2006/12/03 18:09:09 christos Exp $
.\" $NetBSD: mail.1,v 1.42 2006/12/06 16:26:25 christos Exp $
.\"
.\" Copyright (c) 1980, 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -1357,6 +1357,17 @@ command to behave like
.Ic dp
\- thus, after deleting a message, the next one will be typed
automatically.
.It Va crt
If
.Va crt
is set, then the PAGER will be used for the
.Ic print ,
.Ic Print ,
.Ic type ,
and
.Ic Type
commands.
Normally these commands do not envoke the pager.
.It Ar debug
Setting the binary option
.Ar debug
@ -1598,18 +1609,6 @@ Pathname of the text editor to use in the
command and
.Ic \&~v
escape.
.It Va crt
The valued option
.Va crt
is used as a threshold to determine how long a message must
be before
.Ev PAGER
is used to read it.
If
.Va crt
is set without a value, then the height of the terminal screen
stored in the system is used to compute the threshold (see
.Xr stty 1 ) .
.It Ar el-completion-keys
A comma or space delimited list of keys to do
.Xr editline 3