mirror of
git://git.sv.gnu.org/nano.git
synced 2025-01-06 01:22:15 +03:00
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.
This commit is contained in:
parent
027365503f
commit
f4a2e7efe2
@ -317,6 +317,10 @@ Don't show the two help lines at the bottom of the screen.
|
||||
.BR \-y ", " \-\-afterends
|
||||
Make Ctrl+Right and Ctrl+Delete stop at word ends instead of beginnings.
|
||||
.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
|
||||
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
|
||||
@ -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.
|
||||
With \fBM\-Z\fR the title bar plus status bar can be toggled.
|
||||
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
|
||||
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
|
||||
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 -%
|
||||
@itemx --stateflags
|
||||
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-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
|
||||
|
||||
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"));
|
||||
#ifndef NANO_TINY
|
||||
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
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
print_opt("-!", "--magic", N_("Also try magic to determine syntax"));
|
||||
#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
|
||||
@ -1820,8 +1822,8 @@ int main(int argc, char **argv)
|
||||
if (*(tail(argv[0])) == 'r')
|
||||
SET(RESTRICTED);
|
||||
|
||||
while ((optchr = getopt_long(argc, argv, "0ABC:DEFGHIJ:KLMNOPQ:RST:UVWX:Y:Z"
|
||||
"abcdef:ghijklmno:pqr:s:tuvwxy$%_!", long_options, NULL)) != -1) {
|
||||
while ((optchr = getopt_long(argc, argv, "ABC:DEFGHIJ:KLMNOPQ:RS$T:UVWX:Y:Z"
|
||||
"abcdef:ghijklmno:pqr:s:tuvwxy!%_0", long_options, NULL)) != -1) {
|
||||
switch (optchr) {
|
||||
#ifndef NANO_TINY
|
||||
case 'A':
|
||||
@ -2053,6 +2055,13 @@ int main(int argc, char **argv)
|
||||
case 'y':
|
||||
SET(AFTER_ENDS);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
case '!':
|
||||
SET(USE_MAGIC);
|
||||
break;
|
||||
#endif
|
||||
#ifndef NANO_TINY
|
||||
case '%':
|
||||
SET(STATEFLAGS);
|
||||
break;
|
||||
@ -2062,11 +2071,6 @@ int main(int argc, char **argv)
|
||||
case '0':
|
||||
SET(ZERO);
|
||||
break;
|
||||
#endif
|
||||
#ifdef HAVE_LIBMAGIC
|
||||
case '!':
|
||||
SET(USE_MAGIC);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
printf(_("Type '%s -h' for a list of available options.\n"), argv[0]);
|
||||
|
Loading…
Reference in New Issue
Block a user