Commit cb56a575 authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

options: recognize -M and --trimblanks on the command line

No related merge requests found
Showing with 15 additions and 1 deletion
+15 -1
......@@ -108,6 +108,10 @@ won't work properly with this option enabled.
.BR \-L ", " \-\-nonewlines
Don't add newlines to the ends of files.
.TP
.BR \-M ", " \-\-trimblanks
Snip trailing whitespace from the wrapped line when automatic
hard-wrapping occurs or when text is justified.
.TP
.BR \-N ", " \-\-noconvert
Disable automatic conversion of files from DOS/Mac format.
.TP
......
......@@ -200,6 +200,11 @@ won't work properly with this option enabled.
@itemx --nonewlines
Don't add newlines to the ends of files.
@item -M
@itemx --trimblanks
Snip trailing whitespace from the wrapped line when automatic
hard-wrapping occurs or when text is justified.
@item -N
@itemx --noconvert
Disable automatic conversion of files from DOS/Mac format.
......
......@@ -818,6 +818,8 @@ void usage(void)
N_("Fix numeric keypad key confusion problem"));
print_opt("-L", "--nonewlines",
N_("Don't add newlines to the ends of files"));
print_opt("-M", "--trimblanks",
N_("Trim tail spaces when hard-wrapping"));
#ifndef NANO_TINY
print_opt("-N", "--noconvert",
N_("Don't convert files from DOS/Mac format"));
......@@ -2031,7 +2033,7 @@ int main(int argc, char **argv)
while ((optchr =
getopt_long(argc, argv,
"ABC:DEFGHIKLNOPQ:RST:UVWX:Y:abcdefghijklmno:pqr:s:tuvwxz$",
"ABC:DEFGHIKLMNOPQ:RST:UVWX:Y:abcdefghijklmno:pqr:s:tuvwxz$",
long_options, NULL)) != -1) {
switch (optchr) {
case 'b':
......@@ -2085,6 +2087,9 @@ int main(int argc, char **argv)
case 'L':
SET(NO_NEWLINES);
break;
case 'M':
SET(TRIM_BLANKS);
break;
#ifndef NANO_TINY
case 'N':
SET(NO_CONVERT);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment