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