change the short option for --restricted from -Z to -R
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@2717 35c25a1d-7b9e-4130-9fde-d3aeb78583b8master
parent
03987abebd
commit
84635cd8e8
|
@ -51,8 +51,10 @@ CVS code -
|
||||||
allows the prepend and append toggles at the search prompt.
|
allows the prepend and append toggles at the search prompt.
|
||||||
For consistency, rename TOGGLE_REGEXP_KEY to NANO_REGEXP_KEY,
|
For consistency, rename TOGGLE_REGEXP_KEY to NANO_REGEXP_KEY,
|
||||||
and move it out of the toggles block to where NANO_PREPEND_KEY
|
and move it out of the toggles block to where NANO_PREPEND_KEY
|
||||||
and NANO_APPEND_KEY are. Changes to shortcut_init(), usage(),
|
and NANO_APPEND_KEY are. Also, change the short command line
|
||||||
main(), search_init(), nano.1, nano.texi, etc. (DLR)
|
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
|
- Various cleanups and improvements in chars.c. Remove some
|
||||||
unnecessary w?ctype wrappers; change the wctype wrappers to
|
unnecessary w?ctype wrappers; change the wctype wrappers to
|
||||||
take wint_t instead of wchar_t to match the functions they
|
take wint_t instead of wchar_t to match the functions they
|
||||||
|
|
|
@ -79,6 +79,13 @@ Set the quoting string for justifying. The default is
|
||||||
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
|
"^([\ \\t]*[|>:}#])+" if regular expression support is available, or
|
||||||
">\ " otherwise.
|
">\ " otherwise.
|
||||||
.TP
|
.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)
|
.B \-S (\-\-smooth)
|
||||||
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
Enable smooth scrolling. Text will scroll line-by-line, instead of the
|
||||||
usual chunk-by-chunk behavior.
|
usual chunk-by-chunk behavior.
|
||||||
|
@ -97,13 +104,6 @@ Show the current version number and author.
|
||||||
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
|
Specify a specific syntax highlighting from the \fInanorc\fP to use, if
|
||||||
available.
|
available.
|
||||||
.TP
|
.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)
|
.B \-c (\-\-const)
|
||||||
Constantly show the cursor position. Note that this cancels out
|
Constantly show the cursor position. Note that this cancels out
|
||||||
\fB-U\fP.
|
\fB-U\fP.
|
||||||
|
|
|
@ -151,6 +151,13 @@ Set the quoting string for justifying. The default is
|
||||||
if regular expression support is available, or ``> '' otherwise. Note
|
if regular expression support is available, or ``> '' otherwise. Note
|
||||||
that @code{\t} above stands for a literal Tab character.
|
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
|
@item -S, --smooth
|
||||||
Enable smooth scrolling.
|
Enable smooth scrolling.
|
||||||
|
|
||||||
|
@ -168,13 +175,6 @@ Print the version number and copyright and quit.
|
||||||
Specify a specific syntax highlighting from the .nanorc to use, if
|
Specify a specific syntax highlighting from the .nanorc to use, if
|
||||||
available.
|
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
|
@item -c, --const
|
||||||
Constantly display the cursor position and line number on the statusbar.
|
Constantly display the cursor position and line number on the statusbar.
|
||||||
Note that this cancels out -U.
|
Note that this cancels out -U.
|
||||||
|
|
14
src/nano.c
14
src/nano.c
|
@ -1051,6 +1051,7 @@ void usage(void)
|
||||||
print1opt(_("-Q [str]"), _("--quotestr=[str]"),
|
print1opt(_("-Q [str]"), _("--quotestr=[str]"),
|
||||||
N_("Quoting string"));
|
N_("Quoting string"));
|
||||||
#endif
|
#endif
|
||||||
|
print1opt("-R", "--restricted", N_("Restricted mode"));
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
print1opt("-S", "--smooth", N_("Smooth scrolling"));
|
print1opt("-S", "--smooth", N_("Smooth scrolling"));
|
||||||
#endif
|
#endif
|
||||||
|
@ -1066,7 +1067,6 @@ void usage(void)
|
||||||
print1opt(_("-Y [str]"), _("--syntax=[str]"),
|
print1opt(_("-Y [str]"), _("--syntax=[str]"),
|
||||||
N_("Syntax definition to use"));
|
N_("Syntax definition to use"));
|
||||||
#endif
|
#endif
|
||||||
print1opt("-Z", "--restricted", N_("Restricted mode"));
|
|
||||||
print1opt("-c", "--const", N_("Constantly show cursor position"));
|
print1opt("-c", "--const", N_("Constantly show cursor position"));
|
||||||
print1opt("-d", "--rebinddelete",
|
print1opt("-d", "--rebinddelete",
|
||||||
N_("Fix Backspace/Delete confusion problem"));
|
N_("Fix Backspace/Delete confusion problem"));
|
||||||
|
@ -4119,12 +4119,12 @@ int main(int argc, char **argv)
|
||||||
#ifndef DISABLE_JUSTIFY
|
#ifndef DISABLE_JUSTIFY
|
||||||
{"quotestr", 1, NULL, 'Q'},
|
{"quotestr", 1, NULL, 'Q'},
|
||||||
#endif
|
#endif
|
||||||
|
{"restricted", 0, NULL, 'R'},
|
||||||
{"tabsize", 1, NULL, 'T'},
|
{"tabsize", 1, NULL, 'T'},
|
||||||
{"version", 0, NULL, 'V'},
|
{"version", 0, NULL, 'V'},
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
{"syntax", 1, NULL, 'Y'},
|
{"syntax", 1, NULL, 'Y'},
|
||||||
#endif
|
#endif
|
||||||
{"restricted", 0, NULL, 'Z'},
|
|
||||||
{"const", 0, NULL, 'c'},
|
{"const", 0, NULL, 'c'},
|
||||||
{"rebinddelete", 0, NULL, 'd'},
|
{"rebinddelete", 0, NULL, 'd'},
|
||||||
{"nofollow", 0, NULL, 'l'},
|
{"nofollow", 0, NULL, 'l'},
|
||||||
|
@ -4197,11 +4197,11 @@ int main(int argc, char **argv)
|
||||||
while ((optchr =
|
while ((optchr =
|
||||||
#ifdef HAVE_GETOPT_LONG
|
#ifdef HAVE_GETOPT_LONG
|
||||||
getopt_long(argc, argv,
|
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)
|
long_options, NULL)
|
||||||
#else
|
#else
|
||||||
getopt(argc, argv,
|
getopt(argc, argv,
|
||||||
"h?ABC:EFHINOQ:ST:UVY:Zabcdefgijklmo:pr:s:tvwxz")
|
"h?ABC:EFHINOQ:RST:UVY:abcdefgijklmo:pr:s:tvwxz")
|
||||||
#endif
|
#endif
|
||||||
) != -1) {
|
) != -1) {
|
||||||
|
|
||||||
|
@ -4256,6 +4256,9 @@ int main(int argc, char **argv)
|
||||||
quotestr = mallocstrcpy(quotestr, optarg);
|
quotestr = mallocstrcpy(quotestr, optarg);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
case 'R':
|
||||||
|
SET(RESTRICTED);
|
||||||
|
break;
|
||||||
#ifndef NANO_SMALL
|
#ifndef NANO_SMALL
|
||||||
case 'S':
|
case 'S':
|
||||||
SET(SMOOTH_SCROLL);
|
SET(SMOOTH_SCROLL);
|
||||||
|
@ -4281,9 +4284,6 @@ int main(int argc, char **argv)
|
||||||
syntaxstr = mallocstrcpy(syntaxstr, optarg);
|
syntaxstr = mallocstrcpy(syntaxstr, optarg);
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
case 'Z':
|
|
||||||
SET(RESTRICTED);
|
|
||||||
break;
|
|
||||||
case 'c':
|
case 'c':
|
||||||
SET(CONST_UPDATE);
|
SET(CONST_UPDATE);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue