diff options
Diffstat (limited to 'usr.bin/mg')
-rw-r--r-- | usr.bin/mg/main.c | 11 | ||||
-rw-r--r-- | usr.bin/mg/mg.1 | 6 |
2 files changed, 13 insertions, 4 deletions
diff --git a/usr.bin/mg/main.c b/usr.bin/mg/main.c index abbee6b6395..ca074f2708b 100644 --- a/usr.bin/mg/main.c +++ b/usr.bin/mg/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.34 2005/03/09 16:20:48 jfb Exp $ */ +/* $OpenBSD: main.c,v 1.35 2005/03/10 16:47:33 henning Exp $ */ /* * Mainline. @@ -32,9 +32,13 @@ main(int argc, char **argv) char *cp, *init_fcn_name = NULL; PF init_fcn = NULL; int o, i, nfiles, status; + int nobackups = 0; - while ((o = getopt(argc, argv, "f:")) != -1) + while ((o = getopt(argc, argv, "nf:")) != -1) switch (o) { + case 'n': + nobackups = 1; + break; case 'f': if (init_fcn_name != NULL) errx(1, "cannot specify more than one " @@ -87,6 +91,9 @@ main(int argc, char **argv) (void)load(cp); #endif /* !NO_STARTUP */ + if (nobackups) + makebkfile(FFARG, 0); + for (nfiles = 0, i = 0; i < argc; i++) { if (argv[i][0] == '+' && strlen(argv[i]) >= 2) { int lval; diff --git a/usr.bin/mg/mg.1 b/usr.bin/mg/mg.1 index b4e84ba98dd..7d842ac598b 100644 --- a/usr.bin/mg/mg.1 +++ b/usr.bin/mg/mg.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: mg.1,v 1.20 2004/07/26 16:25:10 mjc Exp $ +.\" $OpenBSD: mg.1,v 1.21 2005/03/10 16:47:34 henning Exp $ .\" .Dd February 25, 2000 .Dt MG 1 @@ -24,7 +24,7 @@ be any reason to learn more editor types than emacs or .Pp The options are as follows: .Pp -.Bl -tag -width xxxxx -compact +.Bl -tag -width Ds .It Ar +number Go to the line specified by number (do not insert a space between the "+" sign and the number). @@ -35,6 +35,8 @@ line of the file, +-2 will be second last, and so on. Run the mode command for all buffers created from arguments on the command line, including the scratch buffer and all files. +.It Fl n +Turn off backup file generation. .El .Pp Normal editing commands are very similar to Gnu Emacs. |