tweaks: move the --magic option up, so that --zero comes last
This makes that the three options that change the default layout of the interface (--stateflags, --minibar, --zero) come last. Also, sort the option letters into a consistent order in the code.
Этот коммит содержится в:
родитель
027365503f
Коммит
f4a2e7efe2
@ -317,6 +317,10 @@ Don't show the two help lines at the bottom of the screen.
|
|||||||
.BR \-y ", " \-\-afterends
|
.BR \-y ", " \-\-afterends
|
||||||
Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings.
|
Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings.
|
||||||
.TP
|
.TP
|
||||||
|
.BR \-! ", " \-\-magic
|
||||||
|
When neither the file's name nor its first line give a clue,
|
||||||
|
try using libmagic to determine the applicable syntax.
|
||||||
|
.TP
|
||||||
.BR \-% ", " \-\-stateflags
|
.BR \-% ", " \-\-stateflags
|
||||||
Use the top-right corner of the screen for showing some state flags:
|
Use the top-right corner of the screen for showing some state flags:
|
||||||
\fBI\fR when auto-indenting, \fBM\fR when the mark is on, \fBL\fR when
|
\fBI\fR when auto-indenting, \fBM\fR when the mark is on, \fBL\fR when
|
||||||
@ -349,10 +353,6 @@ The status bar appears only when there is a significant message,
|
|||||||
and disappears after 1.5 seconds or upon the next keystroke.
|
and disappears after 1.5 seconds or upon the next keystroke.
|
||||||
With \fBM\-Z\fR the title bar plus status bar can be toggled.
|
With \fBM\-Z\fR the title bar plus status bar can be toggled.
|
||||||
With \fBM\-X\fR the help lines.
|
With \fBM\-X\fR the help lines.
|
||||||
.TP
|
|
||||||
.BR \-! ", " \-\-magic
|
|
||||||
When neither the file's name nor its first line give a clue,
|
|
||||||
try using libmagic to determine the applicable syntax.
|
|
||||||
|
|
||||||
.SH TOGGLES
|
.SH TOGGLES
|
||||||
Several of the above options can be switched on and off also while
|
Several of the above options can be switched on and off also while
|
||||||
|
@ -672,6 +672,11 @@ disabled to display the help-system navigation keys.
|
|||||||
Make @kbd{Ctrl+Right} and @kbd{Ctrl+Delete} stop at word ends
|
Make @kbd{Ctrl+Right} and @kbd{Ctrl+Delete} stop at word ends
|
||||||
instead of beginnings.
|
instead of beginnings.
|
||||||
|
|
||||||
|
@item -!
|
||||||
|
@itemx --magic
|
||||||
|
When neither the file's name nor its first line give a clue,
|
||||||
|
try using libmagic to determine the applicable syntax.
|
||||||
|
|
||||||
@item -%
|
@item -%
|
||||||
@itemx --stateflags
|
@itemx --stateflags
|
||||||
Use the top-right corner of the screen for showing some state flags:
|
Use the top-right corner of the screen for showing some state flags:
|
||||||
@ -708,11 +713,6 @@ and disappears after 1.5 seconds or upon the next keystroke.
|
|||||||
With @kbd{M-Z} the title bar plus status bar can be toggled.
|
With @kbd{M-Z} the title bar plus status bar can be toggled.
|
||||||
With @kbd{M-X} the help lines.
|
With @kbd{M-X} the help lines.
|
||||||
|
|
||||||
@item -!
|
|
||||||
@itemx --magic
|
|
||||||
When neither the file's name nor its first line give a clue,
|
|
||||||
try using libmagic to determine the applicable syntax.
|
|
||||||
|
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
Option @code{-z} (@code{--suspendable}) has been removed.
|
Option @code{-z} (@code{--suspendable}) has been removed.
|
||||||
|
24
src/nano.c
24
src/nano.c
@ -651,13 +651,15 @@ void usage(void)
|
|||||||
print_opt("-x", "--nohelp", N_("Don't show the two help lines"));
|
print_opt("-x", "--nohelp", N_("Don't show the two help lines"));
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
print_opt("-y", "--afterends", N_("Make Ctrl+Right stop at word ends"));
|
print_opt("-y", "--afterends", N_("Make Ctrl+Right stop at word ends"));
|
||||||
print_opt("-%", "--stateflags", N_("Show some states on the title bar"));
|
|
||||||
print_opt("-_", "--minibar", N_("Show a feedback bar at the bottom"));
|
|
||||||
print_opt("-0", "--zero", N_("Hide all bars, use whole terminal"));
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_LIBMAGIC
|
#ifdef HAVE_LIBMAGIC
|
||||||
print_opt("-!", "--magic", N_("Also try magic to determine syntax"));
|
print_opt("-!", "--magic", N_("Also try magic to determine syntax"));
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef NANO_TINY
|
||||||
|
print_opt("-%", "--stateflags", N_("Show some states on the title bar"));
|
||||||
|
print_opt("-_", "--minibar", N_("Show a feedback bar at the bottom"));
|
||||||
|
print_opt("-0", "--zero", N_("Hide all bars, use whole terminal"));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Display the version number of this nano, a copyright notice, some contact
|
/* Display the version number of this nano, a copyright notice, some contact
|
||||||
@ -1820,8 +1822,8 @@ int main(int argc, char **argv)
|
|||||||
if (*(tail(argv[0])) == 'r')
|
if (*(tail(argv[0])) == 'r')
|
||||||
SET(RESTRICTED);
|
SET(RESTRICTED);
|
||||||
|
|
||||||
while ((optchr = getopt_long(argc, argv, "0ABC:DEFGHIJ:KLMNOPQ:RST:UVWX:Y:Z"
|
while ((optchr = getopt_long(argc, argv, "ABC:DEFGHIJ:KLMNOPQ:RS$T:UVWX:Y:Z"
|
||||||
"abcdef:ghijklmno:pqr:s:tuvwxy$%_!", long_options, NULL)) != -1) {
|
"abcdef:ghijklmno:pqr:s:tuvwxy!%_0", long_options, NULL)) != -1) {
|
||||||
switch (optchr) {
|
switch (optchr) {
|
||||||
#ifndef NANO_TINY
|
#ifndef NANO_TINY
|
||||||
case 'A':
|
case 'A':
|
||||||
@ -2053,6 +2055,13 @@ int main(int argc, char **argv)
|
|||||||
case 'y':
|
case 'y':
|
||||||
SET(AFTER_ENDS);
|
SET(AFTER_ENDS);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_LIBMAGIC
|
||||||
|
case '!':
|
||||||
|
SET(USE_MAGIC);
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
|
#ifndef NANO_TINY
|
||||||
case '%':
|
case '%':
|
||||||
SET(STATEFLAGS);
|
SET(STATEFLAGS);
|
||||||
break;
|
break;
|
||||||
@ -2062,11 +2071,6 @@ int main(int argc, char **argv)
|
|||||||
case '0':
|
case '0':
|
||||||
SET(ZERO);
|
SET(ZERO);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
#ifdef HAVE_LIBMAGIC
|
|
||||||
case '!':
|
|
||||||
SET(USE_MAGIC);
|
|
||||||
break;
|
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
printf(_("Type '%s -h' for a list of available options.\n"), argv[0]);
|
printf(_("Type '%s -h' for a list of available options.\n"), argv[0]);
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user