59725788f609cbd70a127c1a9fd72f95eb210266
[platform/upstream/less.git] / 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   ESC-U                Clear search highlighting.
46   &_\bp_\ba_\bt_\bt_\be_\br_\bn          *  Display only matching lines.
47         ---------------------------------------------------
48         A search pattern may begin with one or more of:
49         ^N or !  Search for NON-matching lines.
50         ^E or *  Search multiple files (pass thru END OF FILE).
51         ^F or @  Start search at FIRST file (for /) or last file (for ?).
52         ^K       Highlight matches, but don't move (KEEP position).
53         ^R       Don't use REGULAR EXPRESSIONS.
54         ^W       WRAP search if no match found.
55  ---------------------------------------------------------------------------
56
57                            J\bJU\bUM\bMP\bPI\bIN\bNG\bG
58
59   g  <  ESC-<       *  Go to first line in file (or line _\bN).
60   G  >  ESC->       *  Go to last line in file (or line _\bN).
61   p  %              *  Go to beginning of file (or _\bN percent into file).
62   t                 *  Go to the (_\bN-th) next tag.
63   T                 *  Go to the (_\bN-th) previous tag.
64   {  (  [           *  Find close bracket } ) ].
65   }  )  ]           *  Find open bracket { ( [.
66   ESC-^F _\b<_\bc_\b1_\b> _\b<_\bc_\b2_\b>  *  Find close bracket _\b<_\bc_\b2_\b>.
67   ESC-^B _\b<_\bc_\b1_\b> _\b<_\bc_\b2_\b>  *  Find open bracket _\b<_\bc_\b1_\b>.
68         ---------------------------------------------------
69         Each "find close bracket" command goes forward to the close bracket 
70           matching the (_\bN-th) open bracket in the top line.
71         Each "find open bracket" command goes backward to the open bracket 
72           matching the (_\bN-th) close bracket in the bottom line.
73
74   m_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Mark the current top line with <letter>.
75   M_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Mark the current bottom line with <letter>.
76   '_\b<_\bl_\be_\bt_\bt_\be_\br_\b>            Go to a previously marked position.
77   ''                   Go to the previous position.
78   ^X^X                 Same as '.
79   ESC-m_\b<_\bl_\be_\bt_\bt_\be_\br_\b>        Clear a mark.
80         ---------------------------------------------------
81         A mark is any upper-case or lower-case letter.
82         Certain marks are predefined:
83              ^  means  beginning of the file
84              $  means  end of the file
85  ---------------------------------------------------------------------------
86
87                         C\bCH\bHA\bAN\bNG\bGI\bIN\bNG\bG F\bFI\bIL\bLE\bES\bS
88
89   :e [_\bf_\bi_\bl_\be]            Examine a new file.
90   ^X^V                 Same as :e.
91   :n                *  Examine the (_\bN-th) next file from the command line.
92   :p                *  Examine the (_\bN-th) previous file from the command line.
93   :x                *  Examine the first (or _\bN-th) file from the command line.
94   :d                   Delete the current file from the command line list.
95   =  ^G  :f            Print current file name.
96  ---------------------------------------------------------------------------
97
98                     M\bMI\bIS\bSC\bCE\bEL\bLL\bLA\bAN\bNE\bEO\bOU\bUS\bS C\bCO\bOM\bMM\bMA\bAN\bND\bDS\bS
99
100   -_\b<_\bf_\bl_\ba_\bg_\b>              Toggle a command line option [see OPTIONS below].
101   --_\b<_\bn_\ba_\bm_\be_\b>             Toggle a command line option, by name.
102   __\b<_\bf_\bl_\ba_\bg_\b>              Display the setting of a command line option.
103   ___\b<_\bn_\ba_\bm_\be_\b>             Display the setting of an option, by name.
104   +_\bc_\bm_\bd                 Execute the less cmd each time a new file is examined.
105
106   !_\bc_\bo_\bm_\bm_\ba_\bn_\bd             Execute the shell command with $SHELL.
107   |X\bX_\bc_\bo_\bm_\bm_\ba_\bn_\bd            Pipe file between current pos & mark X\bX to shell command.
108   s _\bf_\bi_\bl_\be               Save input to a file.
109   v                    Edit the current file with $VISUAL or $EDITOR.
110   V                    Print version number of "less".
111  ---------------------------------------------------------------------------
112
113                            O\bOP\bPT\bTI\bIO\bON\bNS\bS
114
115         Most options may be changed either on the command line,
116         or from within less by using the - or -- command.
117         Options may be given in one of two forms: either a single
118         character preceded by a -, or a name preceded by --.
119
120   -?  ........  --help
121                   Display help (from command line).
122   -a  ........  --search-skip-screen
123                   Search skips current screen.
124   -A  ........  --SEARCH-SKIP-SCREEN
125                   Search starts just after target line.
126   -b [_\bN]  ....  --buffers=[_\bN]
127                   Number of buffers.
128   -B  ........  --auto-buffers
129                   Don't automatically allocate buffers for pipes.
130   -c  ........  --clear-screen
131                   Repaint by clearing rather than scrolling.
132   -d  ........  --dumb
133                   Dumb terminal.
134   -D x\bx_\bc_\bo_\bl_\bo_\br  .  --color=x\bx_\bc_\bo_\bl_\bo_\br
135                   Set screen colors.
136   -e  -E  ....  --quit-at-eof  --QUIT-AT-EOF
137                   Quit at end of file.
138   -f  ........  --force
139                   Force open non-regular files.
140   -F  ........  --quit-if-one-screen
141                   Quit if entire file fits on first screen.
142   -g  ........  --hilite-search
143                   Highlight only last match for searches.
144   -G  ........  --HILITE-SEARCH
145                   Don't highlight any matches for searches.
146   -h [_\bN]  ....  --max-back-scroll=[_\bN]
147                   Backward scroll limit.
148   -i  ........  --ignore-case
149                   Ignore case in searches that do not contain uppercase.
150   -I  ........  --IGNORE-CASE
151                   Ignore case in all searches.
152   -j [_\bN]  ....  --jump-target=[_\bN]
153                   Screen position of target lines.
154   -J  ........  --status-column
155                   Display a status column at left edge of screen.
156   -k [_\bf_\bi_\bl_\be]  .  --lesskey-file=[_\bf_\bi_\bl_\be]
157                   Use a lesskey file.
158   -K  ........  --quit-on-intr
159                   Exit less in response to ctrl-C.
160   -L  ........  --no-lessopen
161                   Ignore the LESSOPEN environment variable.
162   -m  -M  ....  --long-prompt  --LONG-PROMPT
163                   Set prompt style.
164   -n .........  --line-numbers
165                   Suppress line numbers in prompts and messages.
166   -N .........  --LINE-NUMBERS
167                   Display line number at start of each line.
168   -o [_\bf_\bi_\bl_\be]  .  --log-file=[_\bf_\bi_\bl_\be]
169                   Copy to log file (standard input only).
170   -O [_\bf_\bi_\bl_\be]  .  --LOG-FILE=[_\bf_\bi_\bl_\be]
171                   Copy to log file (unconditionally overwrite).
172   -p [_\bp_\ba_\bt_\bt_\be_\br_\bn]  --pattern=[_\bp_\ba_\bt_\bt_\be_\br_\bn]
173                   Start at pattern (from command line).
174   -P [_\bp_\br_\bo_\bm_\bp_\bt]   --prompt=[_\bp_\br_\bo_\bm_\bp_\bt]
175                   Define new prompt.
176   -q  -Q  ....  --quiet  --QUIET  --silent --SILENT
177                   Quiet the terminal bell.
178   -r  -R  ....  --raw-control-chars  --RAW-CONTROL-CHARS
179                   Output "raw" control characters.
180   -s  ........  --squeeze-blank-lines
181                   Squeeze multiple blank lines.
182   -S  ........  --chop-long-lines
183                   Chop (truncate) long lines rather than wrapping.
184   -t [_\bt_\ba_\bg]  ..  --tag=[_\bt_\ba_\bg]
185                   Find a tag.
186   -T [_\bt_\ba_\bg_\bs_\bf_\bi_\bl_\be] --tag-file=[_\bt_\ba_\bg_\bs_\bf_\bi_\bl_\be]
187                   Use an alternate tags file.
188   -u  -U  ....  --underline-special  --UNDERLINE-SPECIAL
189                   Change handling of backspaces.
190   -V  ........  --version
191                   Display the version number of "less".
192   -w  ........  --hilite-unread
193                   Highlight first new line after forward-screen.
194   -W  ........  --HILITE-UNREAD
195                   Highlight first new line after any forward movement.
196   -x [_\bN[,...]]  --tabs=[_\bN[,...]]
197                   Set tab stops.
198   -X  ........  --no-init
199                   Don't use termcap init/deinit strings.
200   -y [_\bN]  ....  --max-forw-scroll=[_\bN]
201                   Forward scroll limit.
202   -z [_\bN]  ....  --window=[_\bN]
203                   Set size of window.
204   -" [_\bc[_\bc]]  .  --quotes=[_\bc[_\bc]]
205                   Set shell quote characters.
206   -~  ........  --tilde
207                   Don't display tildes after end of file.
208   -# [_\bN]  ....  --shift=[_\bN]
209                   Set horizontal scroll amount (0 = one half screen width).
210                 --file-size
211                   Automatically determine the size of the input file.
212                 --follow-name
213                   The F command changes files if the input file is renamed.
214                 --header=[_\bN[,_\bM]]
215                   Use N lines and M columns to display file headers.
216                 --incsearch
217                   Search file as each pattern character is typed in.
218                 --line-num-width=N
219                   Set the width of the -N line number field to N characters.
220                 --mouse
221                   Enable mouse input.
222                 --no-keypad
223                   Don't send termcap keypad init/deinit strings.
224                 --no-histdups
225                   Remove duplicates from command history.
226                 --no-number-headers
227                   Don't give line numbers to header lines.
228                 --redraw-on-quit
229                   Redraw final screen when quitting.
230                 --rscroll=C
231                   Set the character used to mark truncated lines.
232                 --save-marks
233                   Retain marks across invocations of less.
234                 --search-options=[EFKNRW-]
235                   Set default options for every search.
236                 --status-col-width=N
237                   Set the width of the -J status column to N characters.
238                 --status-line
239                   Highlight or color the entire line containing a mark.
240                 --use-backslash
241                   Subsequent options use backslash as escape char.
242                 --use-color
243                   Enables colored text.
244                 --wheel-lines=N
245                   Each click of the mouse wheel moves N lines.
246
247
248  ---------------------------------------------------------------------------
249
250                           L\bLI\bIN\bNE\bE E\bED\bDI\bIT\bTI\bIN\bNG\bG
251
252         These keys can be used to edit text being entered 
253         on the "command line" at the bottom of the screen.
254
255  RightArrow ..................... ESC-l ... Move cursor right one character.
256  LeftArrow ...................... ESC-h ... Move cursor left one character.
257  ctrl-RightArrow  ESC-RightArrow  ESC-w ... Move cursor right one word.
258  ctrl-LeftArrow   ESC-LeftArrow   ESC-b ... Move cursor left one word.
259  HOME ........................... ESC-0 ... Move cursor to start of line.
260  END ............................ ESC-$ ... Move cursor to end of line.
261  BACKSPACE ................................ Delete char to left of cursor.
262  DELETE ......................... ESC-x ... Delete char under cursor.
263  ctrl-BACKSPACE   ESC-BACKSPACE ........... Delete word to left of cursor.
264  ctrl-DELETE .... ESC-DELETE .... ESC-X ... Delete word under cursor.
265  ctrl-U ......... ESC (MS-DOS only) ....... Delete entire line.
266  UpArrow ........................ ESC-k ... Retrieve previous command line.
267  DownArrow ...................... ESC-j ... Retrieve next command line.
268  TAB ...................................... Complete filename & cycle.
269  SHIFT-TAB ...................... ESC-TAB   Complete filename & reverse cycle.
270  ctrl-L ................................... Complete filename, list all.