Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
cs24-19fa
git_rec_nano
Commits
cb56a575
Commit
cb56a575
authored
7 years ago
by
Benno Schulenberg
Browse files
Options
Download
Email Patches
Plain Diff
options: recognize -M and --trimblanks on the command line
parent
a429dc4a
master
feature/match-parens
refactor/readbility
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/nano.1
+4
-0
doc/nano.1
doc/nano.texi
+5
-0
doc/nano.texi
src/nano.c
+6
-1
src/nano.c
with
15 additions
and
1 deletion
+15
-1
doc/nano.1
View file @
cb56a575
...
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
doc/nano.texi
View file @
cb56a575
...
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
src/nano.c
View file @
cb56a575
...
...
@@ -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:DEFGHIKL
M
NOPQ: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
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help