Mateusz Kazimierczuk e65b0ba654 options: add -? as a synonym of -h (--help)
The short option '-?' was removed nine years ago in commit 43019189,
then restored six years later in 5bd92d4c, and then removed again two
months later in 743100fe due to getopt() returning '?' for options
that aren't recognized, preventing the use of '-?' as a valid option.

However, getopt() provides a way to check for unrecognized options
via the 'optopt' variable, which gets set only for invalid options.

Signed-off-by: Mateusz Kazimierczuk <mataha+savannah@protonmail.com>
Signed-off-by: Benno Schulenberg <bensberg@telfort.nl>
2023-07-31 07:40:07 +02:00

65 lines
1.9 KiB
Groff

.\" Copyright (C) 2002-2007, 2014-2023 Free Software Foundation, Inc.
.\"
.\" This document is dual-licensed. You may distribute and/or modify it
.\" under the terms of either of the following licenses:
.\"
.\" * The GNU General Public License, as published by the Free Software
.\" Foundation, version 3 or (at your option) any later version. You
.\" should have received a copy of the GNU General Public License
.\" along with this program. If not, see
.\" <https://www.gnu.org/licenses/>.
.\"
.\" * The GNU Free Documentation License, as published by the Free
.\" Software Foundation, version 1.2 or (at your option) any later
.\" version, with no Invariant Sections, no Front-Cover Texts, and no
.\" Back-Cover Texts. You should have received a copy of the GNU Free
.\" Documentation License along with this program. If not, see
.\" <https://www.gnu.org/licenses/>.
.\"
.TH RNANO 1 "version 7.2" "January 2023"
.SH NAME
rnano \- a restricted nano
.SH SYNOPSIS
.B rnano
.RI [ options "] [[+" line [, column "]]\ " file "]..."
.SH DESCRIPTION
\fBrnano\fR runs the \fBnano\fR editor in restricted mode. This allows
editing only the specified file or files, and doesn't allow the user
access to the filesystem nor to a command shell.
.sp
In restricted mode, \fBnano\fR will:
.IP \[bu] 2
not make backups;
.IP \[bu]
not allow suspending;
.IP \[bu]
not allow spell checking;
.IP \[bu]
not read nor write the history files;
.IP \[bu]
not allow saving the current buffer under a different name;
.IP \[bu]
not allow inserting another file or opening a new buffer;
.IP \[bu]
not allow appending or prepending to any file.
.SH OPTIONS
.TP
.BR \-h ", " \-? ", " \-\-help
Show the available command-line options and exit.
.P
For all existing options, see the \fBnano\fR(1) man page.
.SH BUGS
Please report bugs via
.IR https://savannah.gnu.org/bugs/?group=nano .
.SH HOMEPAGE
.I https://nano-editor.org/
.SH SEE ALSO
.BR nano (1)