<xi:include href="standard-options.xml" xpointer="help" />
<xi:include href="standard-options.xml" xpointer="version" />
<xi:include href="standard-options.xml" xpointer="json" />
+
+ <varlistentry id='no-pager'>
+ <term><option>--no-pager</option></term>
+
+ <listitem><para>Do not pipe output into a pager. This currently only applies to
+ <option>--help</option>. (The pager is not started during normal operation.)</para>
+
+ <xi:include href="version-info.xml" xpointer="v256"/>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>All command line arguments after the first non-option argument become part of the command line of
--path-property --socket-property --timer-property -H --host -M --machine --expand-environment
--background --json --job-mode
)
- local OPTS="${opts_with_values[*]} --no-ask-password --scope -u --slice-inherit -r --remain-after-exit
+ local OPTS="${opts_with_values[*]} --no-ask-password --no-pager
+ --scope -u --slice-inherit -r --remain-after-exit
--send-sighup -d --same-dir -t --pty -P --pipe -S --shell -q --quiet --ignore-failure
--on-clock-change --on-timezone-change --no-block --wait -G --collect --user --system -h --help --version -v --verbose"
local mode=--system
'(-C --capsule)'{-C,--capsule=}'[Operate on capsule]:capsule' \
'--nice=[Nice level]:nice level' \
'--no-ask-password[Do not query the user for authentication]' \
+ '--no-pager[Do not spawn a pager]' \
'(--wait)--no-block[Do not synchronously wait for the unit start operation to finish]' \
'--on-active=[Run after SEC seconds]:SEC' \
'--on-boot=[Run SEC seconds after machine was booted up]:SEC' \
#include "log.h"
#include "main-func.h"
#include "osc-context.h"
+#include "pager.h"
#include "parse-argument.h"
#include "parse-util.h"
#include "path-util.h"
static char *arg_exec_path = NULL;
static bool arg_ignore_failure = false;
static char *arg_background = NULL;
+static PagerFlags arg_pager_flags = 0;
static sd_json_format_flags_t arg_json_format_flags = SD_JSON_FORMAT_OFF;
static char *arg_shell_prompt_prefix = NULL;
static int arg_lightweight = -1;
_cleanup_free_ char *link = NULL;
int r;
+ pager_open(arg_pager_flags);
+
r = terminal_urlify_man("systemd-run", "1", &link);
if (r < 0)
return log_oom();
" when queueing a new job\n"
" --ignore-failure Ignore the exit status of the invoked process\n"
" --background=COLOR Set ANSI color for background\n"
+ " --no-pager Do not pipe output into a pager\n"
"\n%3$sPath options:%4$s\n"
" --path-property=NAME=VALUE Set path unit property\n"
"\n%3$sSocket options:%4$s\n"
ARG_JOB_MODE,
ARG_IGNORE_FAILURE,
ARG_BACKGROUND,
+ ARG_NO_PAGER,
ARG_JSON,
};
{ "job-mode", required_argument, NULL, ARG_JOB_MODE },
{ "ignore-failure", no_argument, NULL, ARG_IGNORE_FAILURE },
{ "background", required_argument, NULL, ARG_BACKGROUND },
+ { "no-pager", no_argument, NULL, ARG_NO_PAGER },
{ "json", required_argument, NULL, ARG_JSON },
{},
};
return r;
break;
+ case ARG_NO_PAGER:
+ arg_pager_flags |= PAGER_DISABLE;
+ break;
+
case ARG_JSON:
r = parse_json_argument(optarg, &arg_json_format_flags);
if (r <= 0)