docs: document the search-at-startup feature (+/string or +?string)
Этот коммит содержится в:
родитель
bdf1a9d4e7
Коммит
a06b921f12
20
doc/nano.1
20
doc/nano.1
@ -23,7 +23,9 @@ nano \- Nano's ANOther editor, inspired by Pico
|
|||||||
|
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B nano
|
.B nano
|
||||||
.RI [ options "] [[+" line [, column "]]\ " file "]..."
|
.RI [ options "] [[\fB+" line [\fB, column "]] " file ]...
|
||||||
|
.sp
|
||||||
|
.BR nano " [" \fIoptions "] [[" + [ crCR ]( / | ? ) \fIstring "] " \fIfile ]...
|
||||||
|
|
||||||
.SH NOTICE
|
.SH NOTICE
|
||||||
Starting with version 4.0, \fBnano\fR no longer hard-wraps an overlong
|
Starting with version 4.0, \fBnano\fR no longer hard-wraps an overlong
|
||||||
@ -38,11 +40,23 @@ If you want the old, Pico behavior back, you can use \fB\-\-breaklonglines\fR,
|
|||||||
of Pico, but is free software, and implements several features that Pico
|
of Pico, but is free software, and implements several features that Pico
|
||||||
lacks, such as: opening multiple files, scrolling per line, undo/redo,
|
lacks, such as: opening multiple files, scrolling per line, undo/redo,
|
||||||
syntax coloring, line numbering, and soft-wrapping overlong lines.
|
syntax coloring, line numbering, and soft-wrapping overlong lines.
|
||||||
|
.sp
|
||||||
When giving a filename on the command line, the cursor can be put on a
|
When giving a filename on the command line, the cursor can be put on a
|
||||||
specific line by adding the line number with a plus sign (\fB+\fR) before
|
specific line by adding the line number with a plus sign (\fB+\fR) before
|
||||||
the filename, and even in a specific column by adding it with a comma.
|
the filename, and even in a specific column by adding it with a comma.
|
||||||
|
The cursor can be put on the first or last occurrence of a specific string
|
||||||
|
by specifying that string after \fB+/\fR or \fB+?\fR before the filename.
|
||||||
|
The string can be made case sensitive and/or caused to be interpreted as a
|
||||||
|
regular expression by inserting \fBc\fR and/or \fBr\fR after the \fB+\fR sign.
|
||||||
|
These search modes can be explicitly disabled by using the uppercase variant
|
||||||
|
of those letters: \fBC\fR and/or \fBR\fR. When the string contains spaces,
|
||||||
|
it needs to be enclosed in quotes. To give an example: to open a file at
|
||||||
|
the first occurrence of the word "Foo", one would do:
|
||||||
|
.sp
|
||||||
|
.RS 4
|
||||||
|
.BI "nano +c/Foo " file
|
||||||
|
.RE
|
||||||
|
.sp
|
||||||
As a special case: if instead of a filename a dash (\fB\-\fR) is given,
|
As a special case: if instead of a filename a dash (\fB\-\fR) is given,
|
||||||
\fBnano\fR will read data from standard input.
|
\fBnano\fR will read data from standard input.
|
||||||
|
|
||||||
|
@ -127,13 +127,21 @@ But it is also possible to specify one or more options (see the next
|
|||||||
section), and to edit several files in a row. Additionally, the cursor
|
section), and to edit several files in a row. Additionally, the cursor
|
||||||
can be put on a specific line of a file by adding the line number
|
can be put on a specific line of a file by adding the line number
|
||||||
with a plus sign before the filename, and even in a specific column by
|
with a plus sign before the filename, and even in a specific column by
|
||||||
adding it with a comma. So a more complete command synopsis is:
|
adding it with a comma.
|
||||||
|
The cursor can also be put on the first or last occurrence of a specific string
|
||||||
|
by specifying that string after @code{+/} or @code{+?} before the filename.
|
||||||
|
The string can be made case sensitive and/or caused to be interpreted as a
|
||||||
|
regular expression by inserting a @code{c} and/or @code{r} after the plus sign.
|
||||||
|
These search modes can be explicitly disabled by using the uppercase variant
|
||||||
|
of those letters: @code{C} and/or @code{R}. When the string contains spaces,
|
||||||
|
it needs to be enclosed in quotes.
|
||||||
|
A more complete command synopsis thus is:
|
||||||
|
|
||||||
@iftex
|
@iftex
|
||||||
@sp 1
|
@sp 1
|
||||||
@end iftex
|
@end iftex
|
||||||
@example
|
@example
|
||||||
@code{nano [OPTION]@dots{} [[+LINE[,COLUMN]|+,COLUMN] FILE]@dots{}}
|
@code{nano [OPTION]@dots{} [[+LINE[,COLUMN]|+[crCR](/|?)STRING] FILE]@dots{}}
|
||||||
@end example
|
@end example
|
||||||
@iftex
|
@iftex
|
||||||
@sp 1
|
@sp 1
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user