From 98b1f8f05904a18cf49520ba788e1a7ee8fff461 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 25 Jan 2019 11:08:06 +0100 Subject: [PATCH] options: stop recognizing and ignoring -b, -e, -f, -j, and -q This signals our break from trying to be as compatible with Pico as possible. We were already incompatible with modern Pico in the -n and -W options, and in several character-set and color options, so ignoring those five options brought us very little. Anyway, soon some of those options will be reused and will have the effect of making nano look and behave more like Pico. --- doc/nano.1 | 3 --- doc/nano.texi | 7 ------- src/nano.c | 8 +------- 3 files changed, 1 insertion(+), 17 deletions(-) diff --git a/doc/nano.1 b/doc/nano.1 index 7623892d..280a47be 100644 --- a/doc/nano.1 +++ b/doc/nano.1 @@ -271,9 +271,6 @@ continuing it over multiple screen lines. Since \&'$' normally refers to a variable in the Unix shell, you should specify this option last when using other options (e.g.\& 'nano \-wS$') or pass it separately (e.g.\& 'nano \-wS \-$'). -.TP -.BR \-b ", " \-e ", " \-f ", " \-j ", " \-q -Ignored, for compatibility with Pico. .SH TOGGLES Several of the above options can be switched on and off also while diff --git a/doc/nano.texi b/doc/nano.texi index 43427d98..6b485f90 100644 --- a/doc/nano.texi +++ b/doc/nano.texi @@ -417,13 +417,6 @@ continuing it over multiple screen lines. Since this option last when using other options (e.g.@: @code{nano -wS$}) or pass it separately (e.g.@: @code{nano -wS -$}). -@item -b -@itemx -e -@itemx -f -@itemx -j -@itemx -q -Ignored, for compatibility with Pico. - @end table diff --git a/src/nano.c b/src/nano.c index accd878e..2f91e9ff 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2084,7 +2084,7 @@ int main(int argc, char **argv) while ((optchr = getopt_long(argc, argv, - "ABC:DEFGHIKLMNOPQ:RST:UVWX:Y:Zabcdefghijklmno:pqr:s:tuvwxyz$", + "ABC:DEFGHIKLMNOPQ:RST:UVWX:Y:Zacdghiklmno:pr:s:tuvwxyz$", long_options, NULL)) != -1) { switch (optchr) { #ifndef NANO_TINY @@ -2293,12 +2293,6 @@ int main(int argc, char **argv) SET(SOFTWRAP); break; #endif - case 'b': /* Pico compatibility flags. */ - case 'e': - case 'f': - case 'j': - case 'q': - break; default: printf(_("Type '%s -h' for a list of available options.\n"), argv[0]); exit(1);