]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - contrib/less/less.hlp
MFC r368207,368607:
[FreeBSD/stable/10.git] / contrib / less / less.hlp
1
2                    S\bSU\bUM\bMM\bMA\bAR\bRY\bY O\bOF\bF L\bLE\bES\bSS\bS C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
3
4       Commands marked with * may be preceded by a number, _\bN.
5       Notes in parentheses indicate the behavior if _\bN is given.
6       A key preceded by a caret indicates the Ctrl key; thus ^K is ctrl-K.
7
8   h  H                 Display this help.
9   q  :q  Q  :Q  ZZ     Exit.
10  ---------------------------------------------------------------------------
11
12                            M\bMO\bOV\bVI\bIN\bNG\bG
13
14   e  ^E  j  ^N  CR  *  Forward  one line   (or _\bN lines).
15   y  ^Y  k  ^K  ^P  *  Backward one line   (or _\bN lines).
16   f  ^F  ^V  SPACE  *  Forward  one window (or _\bN lines).
17   b  ^B  ESC-v      *  Backward one window (or _\bN lines).
18   z                 *  Forward  one window (and set window to _\bN).
19   w                 *  Backward one window (and set window to _\bN).
20   ESC-SPACE         *  Forward  one window, but don't stop at end-of-file.
21   d  ^D             *  Forward  one half-window (and set half-window to _\bN).
22   u  ^U             *  Backward one half-window (and set half-window to _\bN).
23   ESC-)  RightArrow *  Right one half screen width (or _\bN positions).
24   ESC-(  LeftArrow  *  Left  one half screen width (or _\bN positions).
25   ESC-}  ^RightArrow   Right to last column displayed.
26   ESC-{  ^LeftArrow    Left  to first column.
27   F                    Forward forever; like "tail -f".
28   ESC-F                Like F but stop when search pattern is found.
29   r  ^R  ^L            Repaint screen.
30   R                    Repaint screen, discarding buffered input.
31         ---------------------------------------------------
32         Default "window" is the screen height.
33         Default "half-window" is half of the screen height.
34  ---------------------------------------------------------------------------
35
36                           S\bSE\bEA\bAR\bRC\bCH\bHI\bIN\bNG\bG
37
38   /_\bp_\ba_\bt_\bt_\be_\br_\bn          *  Search forward for (_\bN-th) matching line.
39   ?_\bp_\ba_\bt_\bt_\be_\br_\bn          *  Search backward for (_\bN-th) matching line.
40   n                 *  Repeat previous search (for _\bN-th occurrence).
41   N                 *  Repeat previous search in reverse direction.
42   ESC-n             *  Repeat previous search, spanning files.
43   ESC-N             *  Repeat previous search, reverse dir. & spanning files.
44   ESC-u                Undo (toggle) search highlighting.
45   &_\bp_\ba_\bt_\bt_\be_\br_\bn          *  Display only matching lines
46         ---------------------------------------------------
47         A search pattern may be preceded by one or more of:
48         ^N or !  Search for NON-matching lines.
49         ^E or *  Search multiple files (pass thru END OF FILE).
50         ^F or @  Start search at FIRST file (for /) or last file (for ?).
51         ^K       Highlight matches, but don't move (KEEP position).
52         ^R       Don't use REGULAR EXPRESSIONS.
53  ---------------------------------------------------------------------------
54
55                            J\bJU\bUM\bMP\bPI\bIN\bNG\bG
56
57   g  <  ESC-<       *  Go to first line in file (or line _\bN).
58   G  >  ESC->       *  Go to last line in file (or line _\bN).
59   p  %              *  Go to beginning of file (or _\bN percent into file).
60   t                 *  Go to the (_\bN-th) next tag.
61   T                 *  Go to the (_\bN-th) previous tag.
62   {  (  [           *  Find close bracket } ) ].
63   }  )  ]           *  Find open bracket { ( [.
64   ESC-^F _\b<_\bc_\b1_\b> _\b<_\bc_\b2_\b>  *  Find close bracket _\b<_\bc_\b2_\b>.
65   ESC-^B _\b<_\bc_\b1_\b> _\b<_\bc_\b2_\b>  *  Find open bracket _\b<_\bc_\b1_\b
66         ---------------------------------------------------
67         Each "find close bracket" command goes forward to the close bracket 
68           matching the (_\bN-th) open bracket in the top line.
69         Each "find open bracket" command goes backward to the open bracket 
70           matching the (_\bN-th) close bracket in the bottom line.
71
72   m_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Mark the current top line with <letter>.
73   M_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Mark the current bottom line with <letter>.
74   '_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Go to a previously marked position.
75   ''                   Go to the previous position.
76   ^X^X                 Same as '.
77   ESC-M_\b<_\bl_\be_\bt_\bt_\be_\br_\b>        Clear a mark.
78         ---------------------------------------------------
79         A mark is any upper-case or lower-case letter.
80         Certain marks are predefined:
81              ^  means  beginning of the file
82              $  means  end of the file
83  ---------------------------------------------------------------------------
84
85                         C\bCH\bHA\bAN\bNG\bGI\bIN\bNG\bG F\bFI\bIL\bLE\bES\bS
86
87   :e [_\bf_\bi_\bl_\be]            Examine a new file.
88   ^X^V                 Same as :e.
89   :n                *  Examine the (_\bN-th) next file from the command line.
90   :p                *  Examine the (_\bN-th) previous file from the command line.
91   :x                *  Examine the first (or _\bN-th) file from the command line.
92   :d                   Delete the current file from the command line list.
93   =  ^G  :f            Print current file name.
94  ---------------------------------------------------------------------------
95
96                     M\bMI\bIS\bSC\bCE\bEL\bLL\bLA\bAN\bNE\bEO\bOU\bUS\bS C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
97
98   -_\b<_\bf_\bl_\ba_\bg_\b>              Toggle a command line option [see OPTIONS below].
99   --_\b<_\bn_\ba_\bm_\be_\b>             Toggle a command line option, by name.
100   __\b<_\bf_\bl_\ba_\bg_\b>              Display the setting of a command line option.
101   ___\b<_\bn_\ba_\bm_\be_\b>             Display the setting of an option, by name.
102   +_\bc_\bm_\bd                 Execute the less cmd each time a new file is examined.
103
104   !_\bc_\bo_\bm_\bm_\ba_\bn_\bd             Execute the shell command with $SHELL.
105   |X\bX_\bc_\bo_\bm_\bm_\ba_\bn_\bd            Pipe file between current pos & mark X\bX to shell command.
106   s _\bf_\bi_\bl_\be               Save input to a file.
107   v                    Edit the current file with $VISUAL or $EDITOR.
108   V                    Print version number of "less".
109  ---------------------------------------------------------------------------
110
111                            O\bOP\bPT\bTI\bIO\bON\bNS\bS
112
113         Most options may be changed either on the command line,
114         or from within less by using the - or -- command.
115         Options may be given in one of two forms: either a single
116         character preceded by a -, or a name preceded by --.
117
118   -?  ........  --help
119                   Display help (from command line).
120   -a  ........  --search-skip-screen
121                   Search skips current screen.
122   -A  ........  --SEARCH-SKIP-SCREEN
123                   Search starts just after target line.
124   -b [_\bN]  ....  --buffers=[_\bN]
125                   Number of buffers.
126   -B  ........  --auto-buffers
127                   Don't automatically allocate buffers for pipes.
128   -c  ........  --clear-screen
129                   Repaint by clearing rather than scrolling.
130   -d  ........  --dumb
131                   Dumb terminal.
132   -D [_\bx_\bn_\b._\bn]  .  --color=_\bx_\bn_\b._\bn
133                   Set screen colors. (MS-DOS only)
134   -e  -E  ....  --quit-at-eof  --QUIT-AT-EOF
135                   Quit at end of file.
136   -f  ........  --force
137                   Force open non-regular files.
138   -F  ........  --quit-if-one-screen
139                   Quit if entire file fits on first screen.
140   -g  ........  --hilite-search
141                   Highlight only last match for searches.
142   -G  ........  --HILITE-SEARCH
143                   Don't highlight any matches for searches.
144   -h [_\bN]  ....  --max-back-scroll=[_\bN]
145                   Backward scroll limit.
146   -i  ........  --ignore-case
147                   Ignore case in searches that do not contain uppercase.
148   -I  ........  --IGNORE-CASE
149                   Ignore case in all searches.
150   -j [_\bN]  ....  --jump-target=[_\bN]
151                   Screen position of target lines.
152   -J  ........  --status-column
153                   Display a status column at left edge of screen.
154   -k [_\bf_\bi_\bl_\be]  .  --lesskey-file=[_\bf_\bi_\bl_\be]
155                   Use a lesskey file.
156   -K            --quit-on-intr
157                   Exit less in response to ctrl-C.
158   -L  ........  --no-lessopen
159                   Ignore the LESSOPEN environment variable.
160   -m  -M  ....  --long-prompt  --LONG-PROMPT
161                   Set prompt style.
162   -n  -N  ....  --line-numbers  --LINE-NUMBERS
163                   Don't use line numbers.
164   -o [_\bf_\bi_\bl_\be]  .  --log-file=[_\bf_\bi_\bl_\be]
165                   Copy to log file (standard input only).
166   -O [_\bf_\bi_\bl_\be]  .  --LOG-FILE=[_\bf_\bi_\bl_\be]
167                   Copy to log file (unconditionally overwrite).
168   -p [_\bp_\ba_\bt_\bt_\be_\br_\bn]  --pattern=[_\bp_\ba_\bt_\bt_\be_\br_\bn]
169                   Start at pattern (from command line).
170   -P [_\bp_\br_\bo_\bm_\bp_\bt]   --prompt=[_\bp_\br_\bo_\bm_\bp_\bt]
171                   Define new prompt.
172   -q  -Q  ....  --quiet  --QUIET  --silent --SILENT
173                   Quiet the terminal bell.
174   -r  -R  ....  --raw-control-chars  --RAW-CONTROL-CHARS
175                   Output "raw" control characters.
176   -s  ........  --squeeze-blank-lines
177                   Squeeze multiple blank lines.
178   -S  ........  --chop-long-lines
179                   Chop (truncate) long lines rather than wrapping.
180   -t [_\bt_\ba_\bg]  ..  --tag=[_\bt_\ba_\bg]
181                   Find a tag.
182   -T [_\bt_\ba_\bg_\bs_\bf_\bi_\bl_\be] --tag-file=[_\bt_\ba_\bg_\bs_\bf_\bi_\bl_\be]
183                   Use an alternate tags file.
184   -u  -U  ....  --underline-special  --UNDERLINE-SPECIAL
185                   Change handling of backspaces.
186   -V  ........  --version
187                   Display the version number of "less".
188   -w  ........  --hilite-unread
189                   Highlight first new line after forward-screen.
190   -W  ........  --HILITE-UNREAD
191                   Highlight first new line after any forward movement.
192   -x [_\bN[,...]]  --tabs=[_\bN[,...]]
193                   Set tab stops.
194   -X  ........  --no-init
195                   Don't use termcap init/deinit strings.
196   -y [_\bN]  ....  --max-forw-scroll=[_\bN]
197                   Forward scroll limit.
198   -z [_\bN]  ....  --window=[_\bN]
199                   Set size of window.
200   -" [_\bc[_\bc]]  .  --quotes=[_\bc[_\bc]]
201                   Set shell quote characters.
202   -~  ........  --tilde
203                   Don't display tildes after end of file.
204   -# [_\bN]  ....  --shift=[_\bN]
205                   Horizontal scroll amount (0 = one half screen width)
206       ........  --no-keypad
207                   Don't send termcap keypad init/deinit strings.
208       ........  --follow-name
209                   The F command changes files if the input file is renamed.
210       ........  --use-backslash
211                   Subsequent options use backslash as escape char.
212
213
214  ---------------------------------------------------------------------------
215
216                           L\bLI\bIN\bNE\bE E\bED\bDI\bIT\bTI\bIN\bNG\bG
217
218         These keys can be used to edit text being entered 
219         on the "command line" at the bottom of the screen.
220
221  RightArrow ..................... ESC-l ... Move cursor right one character.
222  LeftArrow ...................... ESC-h ... Move cursor left one character.
223  ctrl-RightArrow  ESC-RightArrow  ESC-w ... Move cursor right one word.
224  ctrl-LeftArrow   ESC-LeftArrow   ESC-b ... Move cursor left one word.
225  HOME ........................... ESC-0 ... Move cursor to start of line.
226  END ............................ ESC-$ ... Move cursor to end of line.
227  BACKSPACE ................................ Delete char to left of cursor.
228  DELETE ......................... ESC-x ... Delete char under cursor.
229  ctrl-BACKSPACE   ESC-BACKSPACE ........... Delete word to left of cursor.
230  ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor.
231  ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line.
232  UpArrow ........................ ESC-k ... Retrieve previous command line.
233  DownArrow ...................... ESC-j ... Retrieve next command line.
234  TAB ...................................... Complete filename & cycle.
235  SHIFT-TAB ...................... ESC-TAB   Complete filename & reverse cycle.
236  ctrl-L ................................... Complete filename, list all.
237
238