allows the prepend and append toggles at the search prompt.
For consistency, rename TOGGLE_REGEXP_KEY to NANO_REGEXP_KEY,
and move it out of the toggles block to where NANO_PREPEND_KEY
- and NANO_APPEND_KEY are. Changes to shortcut_init(), usage(),
- main(), search_init(), nano.1, nano.texi, etc. (DLR)
+ and NANO_APPEND_KEY are. Also, change the short command line
+ option for --restricted from -Z to -R. Changes to
+ shortcut_init(), usage(), main(), search_init(), nano.1,
+ nano.texi, etc. (DLR)
- Various cleanups and improvements in chars.c. Remove some
unnecessary w?ctype wrappers; change the wctype wrappers to
take wint_t instead of wchar_t to match the functions they
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
">\ " otherwise.
.TP
+.B \-R (\-\-restricted)
+Restricted mode: Don't read or write to any file not specified on the
+command line, read any nanorc files, allow suspending, or allow a file
+to be appended to, prepended to, or saved under a different name if it
+already has one. Also accessible by invoking \fBnano\fP with any name
+beginning with 'r' (e.g. "rnano").
+.TP
.B \-S (\-\-smooth)
Enable smooth scrolling. Text will scroll line-by-line, instead of the
usual chunk-by-chunk behavior.
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
available.
.TP
-.B \-Z (\-\-restricted)
-Restricted mode: Don't read or write to any file not specified on the
-command line, read any nanorc files, allow suspending, or allow a file
-to be appended to, prepended to, or saved under a different name if it
-already has one. Also accessible by invoking \fBnano\fP with any name
-beginning with 'r' (e.g. "rnano").
-.TP
.B \-c (\-\-const)
Constantly show the cursor position. Note that this cancels out
\fB-U\fP.
if regular expression support is available, or ``> '' otherwise. Note
that @code{\t} above stands for a literal Tab character.
+@item -R, --restricted
+Restricted mode: Don't read or write to any file not specified on the
+command line, read any nanorc files, allow suspending, or allow a file
+to be appended to, prepended to, or saved under a different name if it
+already has one. Also accessible by invoking @code{nano} with any name
+beginning with 'r' (e.g. "rnano").
+
@item -S, --smooth
Enable smooth scrolling.
Specify a specific syntax highlighting from the .nanorc to use, if
available.
-@item -Z, --restricted
-Restricted mode: Don't read or write to any file not specified on the
-command line, read any nanorc files, allow suspending, or allow a file
-to be appended to, prepended to, or saved under a different name if it
-already has one. Also accessible by invoking @code{nano} with any name
-beginning with 'r' (e.g. "rnano").
-
@item -c, --const
Constantly display the cursor position and line number on the statusbar.
Note that this cancels out -U.
print1opt(_("-Q [str]"), _("--quotestr=[str]"),
N_("Quoting string"));
#endif
+ print1opt("-R", "--restricted", N_("Restricted mode"));
#ifndef NANO_SMALL
print1opt("-S", "--smooth", N_("Smooth scrolling"));
#endif
print1opt(_("-Y [str]"), _("--syntax=[str]"),
N_("Syntax definition to use"));
#endif
- print1opt("-Z", "--restricted", N_("Restricted mode"));
print1opt("-c", "--const", N_("Constantly show cursor position"));
print1opt("-d", "--rebinddelete",
N_("Fix Backspace/Delete confusion problem"));
#ifndef DISABLE_JUSTIFY
{"quotestr", 1, NULL, 'Q'},
#endif
+ {"restricted", 0, NULL, 'R'},
{"tabsize", 1, NULL, 'T'},
{"version", 0, NULL, 'V'},
#ifdef ENABLE_COLOR
{"syntax", 1, NULL, 'Y'},
#endif
- {"restricted", 0, NULL, 'Z'},
{"const", 0, NULL, 'c'},
{"rebinddelete", 0, NULL, 'd'},
{"nofollow", 0, NULL, 'l'},
while ((optchr =
#ifdef HAVE_GETOPT_LONG
getopt_long(argc, argv,
- "h?ABC:EFHINOQ:ST:UVY:Zabcdefgijklmo:pr:s:tvwxz",
+ "h?ABC:EFHINOQ:RST:UVY:abcdefgijklmo:pr:s:tvwxz",
long_options, NULL)
#else
getopt(argc, argv,
- "h?ABC:EFHINOQ:ST:UVY:Zabcdefgijklmo:pr:s:tvwxz")
+ "h?ABC:EFHINOQ:RST:UVY:abcdefgijklmo:pr:s:tvwxz")
#endif
) != -1) {
quotestr = mallocstrcpy(quotestr, optarg);
break;
#endif
+ case 'R':
+ SET(RESTRICTED);
+ break;
#ifndef NANO_SMALL
case 'S':
SET(SMOOTH_SCROLL);
syntaxstr = mallocstrcpy(syntaxstr, optarg);
break;
#endif
- case 'Z':
- SET(RESTRICTED);
- break;
case 'c':
SET(CONST_UPDATE);
break;