aboutsummaryrefslogtreecommitdiff
path: root/contrib/less/opttbl.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/less/opttbl.c')
-rw-r--r--contrib/less/opttbl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/less/opttbl.c b/contrib/less/opttbl.c
index be89403d6ce9..292a8be15d1e 100644
--- a/contrib/less/opttbl.c
+++ b/contrib/less/opttbl.c
@@ -86,6 +86,7 @@ public int no_edit_warn; /* Don't warn when editing a LESSOPENed file */
public int stop_on_form_feed; /* Stop scrolling on a line starting with form feed */
public long match_shift_fraction = NUM_FRAC_DENOM/2; /* 1/2 of screen width */
public char intr_char = CONTROL('X'); /* Char to interrupt reads */
+public char *first_cmd_at_prompt = NULL; /* Command to exec before first prompt */
#if HILITE_SEARCH
public int hilite_search; /* Highlight matched search patterns? */
#endif
@@ -184,6 +185,7 @@ static struct optname proc_backspace_optname = { "proc-backspace", NULL };
static struct optname proc_tab_optname = { "proc-tab", NULL };
static struct optname proc_return_optname = { "proc-return", NULL };
static struct optname match_shift_optname = { "match-shift", NULL };
+static struct optname first_cmd_at_prompt_optname = { "cmd", NULL };
#if LESSTEST
static struct optname ttyin_name_optname = { "tty", NULL };
#endif /*LESSTEST*/
@@ -748,6 +750,10 @@ static struct loption option[] =
"Print carriage return as ^M"
}
},
+ { OLETTER_NONE, &first_cmd_at_prompt_optname,
+ O_STRING|O_NO_TOGGLE|O_NO_QUERY, 0, NULL, opt_first_cmd_at_prompt,
+ { NULL, NULL, NULL }
+ },
{ OLETTER_NONE, &match_shift_optname,
O_STRING|O_INIT_HANDLER, 0, NULL, opt_match_shift,
{