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