extern int shift_count;
extern int oldbot;
extern int forw_prompt;
-extern int be_helpful;
extern int less_is_more;
#if SHELL_ESCAPE
static int optgetname;
static POSITION bottompos;
static int save_hshift;
-static char *help_prompt;
#if PIPEC
static char pipec;
#endif
clear_bot();
clear_cmd();
forw_prompt = 0;
- p = help_prompt ? help_prompt : pr_string();
+ p = pr_string();
if (is_filtering())
putstr("& ");
if (p == NULL || *p == '\0')
{
at_enter(AT_STANDOUT);
putstr(p);
- if (be_helpful && !help_prompt && strlen(p) + 40 < sc_width)
- putstr(" [Press space to continue, 'q' to quit.]");
at_exit();
}
- help_prompt = NULL;
clear_eol();
}
break;
default:
- if (be_helpful)
- help_prompt = "[Press 'h' for instructions.]";
- else
- bell();
+ bell();
break;
}
}
-.\" $OpenBSD: less.1,v 1.32 2014/04/25 13:38:21 shadchin Exp $
+.\" $OpenBSD: less.1,v 1.33 2014/04/29 12:11:25 millert Exp $
.\"
.\" Copyright (C) 1984-2012 Mark Nudelman
.\"
.\" OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
.\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: April 25 2014 $
+.Dd $Mdocdate: April 29 2014 $
.Dt LESS 1
.Os
.Sh NAME
By default, full screen repaints are done from the top line down
to avoid the position of the display being moved
when using interactive commands.
-.It Fl d | -dumb No (less only)
+.It Fl d | -dumb
The -d option suppresses the error message
normally displayed if the terminal is dumb;
that is, lacks some important capability,
on a dumb terminal.
This option is on by default when invoked as
.Nm more .
-.It Fl d No (more only)
-The -d option causes the default prompt to include the
-basic directions ``[Press space to continue, 'q' to quit.]''.
-The -d option also causes the message ``[Press 'h' for instructions.]'' to be
-displayed when an invalid command is entered (normally, the bell is rung).
-This option is useful in environments where users may not be experienced
-with pagers.
.\" .It Fl Dxcolor or --color=xcolor"
.\" [MS-DOS only]
.\" Sets the color of the text displayed.
public int quit_at_eof; /* Quit after hitting end of file twice */
public int quit_if_one_screen; /* Quit if EOF on first screen */
public int squeeze; /* Squeeze multiple blank lines into one */
-public int be_helpful; /* more(1) style -d */
public int tabstop; /* Tab settings */
public int back_scroll; /* Repaint screen on backwards movement */
public int forw_scroll; /* Repaint screen on forward movement */
for (o = option; o->oletter != '\0'; o++)
{
- /*
- * Replace less's -d option if invoked as more
- */
- if (less_is_more && o->oletter == 'd')
- {
- o->onames = NULL;
- o->otype = BOOL;
- o->odefault = OPT_OFF;
- o->ovar = &be_helpful;
- o->ofunc = NULL;
- o->odesc[0] = "Be less helpful in prompts";
- o->odesc[1] = "Be helpful in prompts";
- o->odesc[2] = NULL;
- }
-
/*
* Set each variable to its default.
*/