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