summaryrefslogtreecommitdiff
path: root/usr.bin/mg/mg.1
diff options
context:
space:
mode:
authorMark Lumsden <lum@cvs.openbsd.org>2021-03-20 09:00:50 +0000
committerMark Lumsden <lum@cvs.openbsd.org>2021-03-20 09:00:50 +0000
commit71325f77158740c8bd5f3778ac5c12816f119d55 (patch)
treeffa615e9cb82d3b0878285145c629c77aaef7720 /usr.bin/mg/mg.1
parent52b305f2d96a6c384f921a1f2e47659bc7c28638 (diff)
Add a 'batch' mode to mg via the '-b' command line option which will
initialise a pty, run the specified file of mg commands and then exit. This is to facilitate mg fitting into the OpenBSD regress test framework and be able to run via a cron job.
Diffstat (limited to 'usr.bin/mg/mg.1')
-rw-r--r--usr.bin/mg/mg.111
1 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/mg/mg.1 b/usr.bin/mg/mg.1
index e5b4c4a7af6..29066df6ea7 100644
--- a/usr.bin/mg/mg.1
+++ b/usr.bin/mg/mg.1
@@ -1,7 +1,7 @@
-.\" $OpenBSD: mg.1,v 1.120 2021/02/23 18:45:33 lum Exp $
+.\" $OpenBSD: mg.1,v 1.121 2021/03/20 09:00:49 lum Exp $
.\" This file is in the public domain.
.\"
-.Dd $Mdocdate: February 23 2021 $
+.Dd $Mdocdate: March 20 2021 $
.Dt MG 1
.Os
.Sh NAME
@@ -10,6 +10,7 @@
.Sh SYNOPSIS
.Nm mg
.Op Fl nR
+.Op Fl b Ar file
.Op Fl f Ar mode
.Op Fl u Ar file
.Op + Ns Ar number
@@ -35,6 +36,12 @@ sign and the number).
If a negative number is specified, the line number counts
backwards from the end of the file i.e. +-1 will be the last
line of the file, +-2 will be second last, and so on.
+.It Fl b Ar file
+Turn on batch mode and execute the
+.Nm
+commands found in the specified
+.Ar file
+and then terminate.
.It Fl f Ar mode
Run the mode command for all buffers created from
arguments on the command line, including the