patch-less_nro 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. $OpenBSD: patch-less_nro,v 1.1 2007/10/26 20:31:19 ajacoutot Exp $
  2. --- less.nro.orig Thu Mar 2 22:15:01 1995
  3. +++ less.nro Fri Oct 26 22:20:02 2007
  4. @@ -1,12 +1,12 @@
  5. .TH LESS 1
  6. .SH NAME
  7. -less \- opposite of more
  8. +cless \- opposite of more
  9. .SH SYNOPSIS
  10. -.B "less -?"
  11. +.B "cless -?"
  12. .br
  13. -.B "less -V"
  14. +.B "cless -V"
  15. .br
  16. -.B "less [-[+]aBcCdeEfgGiImMnNqQrsSuUVwX]"
  17. +.B "cless [-[+]aBcCdeEfgGiImMnNqQrsSuUVwX]"
  18. .br
  19. .B " [-b \fIbufs\fP] [-h \fIlines\fP] [-j \fIline\fP] [-k \fIkeyfile\fP]"
  20. .br
  21. @@ -23,7 +23,7 @@ is a program similar to
  22. (1), but which allows backward movement
  23. in the file as well as forward movement.
  24. Also,
  25. -.I less
  26. +.I cless
  27. does not have to read the entire input file before starting,
  28. so with large input files it starts up faster than text editors like
  29. .I vi
  30. @@ -114,7 +114,7 @@ standard input, rather than a file, is being read.)
  31. Go to a position N percent into the file.
  32. N should be between 0 and 100.
  33. (This works if standard input is being read, but only if
  34. -.I less
  35. +.I cless
  36. has already read to the end of the file.
  37. It is always fast, but not always useful.)
  38. .PP
  39. @@ -329,18 +329,18 @@ The setting of the option is not changed.
  40. .IP +cmd
  41. Causes the specified cmd to be executed each time a new file is examined.
  42. For example, +G causes
  43. -.I less
  44. +.I cless
  45. to initially display each file starting at the end
  46. rather than the beginning.
  47. .PP
  48. .IP V
  49. Prints the version number of
  50. -.I less
  51. +.I cless
  52. being run.
  53. .PP
  54. .IP "q or :q or :Q or ZZ"
  55. Exits
  56. -.I less.
  57. +.I cless.
  58. .PP
  59. The following
  60. three
  61. @@ -374,13 +374,13 @@ If <m> is . or newline, the current screen is piped.
  62. .SH OPTIONS
  63. Command line options are described below.
  64. Most options may be changed while
  65. -.I less
  66. +.I cless
  67. is running, via the "\-" command.
  68. .PP
  69. Options are also taken from the environment variable "LESS".
  70. For example,
  71. -to avoid typing "less -options ..." each time
  72. -.I less
  73. +to avoid typing "cless -options ..." each time
  74. +.I cless
  75. is invoked, you might tell
  76. .I csh:
  77. .sp
  78. @@ -402,10 +402,10 @@ This is important only for options like -P which take
  79. following string.
  80. .IP -?
  81. This option displays a summary of the commands accepted by
  82. -.I less
  83. +.I cless
  84. (the same as the h command).
  85. If this option is given, all other options are ignored, and
  86. -.I less
  87. +.I cless
  88. exits after the help screen is viewed.
  89. (Depending on how your shell interprets the question mark,
  90. it may be necessary to quote the question mark, thus: "-\\?".)
  91. @@ -417,7 +417,7 @@ By default, searches start at the second line on the s
  92. (or after the last found line; see the -j option).
  93. .IP -b\fIn\fP
  94. Specifies the number of buffers
  95. -.I less
  96. +.I cless
  97. will use for each file.
  98. Buffers are 1K, and by default 10 buffers are used for each file
  99. (except if the file is a pipe; see the -B option).
  100. @@ -444,7 +444,7 @@ normally displayed if the terminal is dumb;
  101. that is, lacks some important capability,
  102. such as the ability to clear the screen or scroll backward.
  103. The -d option does not otherwise change the behavior of
  104. -.I less
  105. +.I cless
  106. on a dumb terminal).
  107. .IP -D\fBx\fP\fIcolor\fP
  108. [MS-DOS only]
  109. @@ -457,31 +457,31 @@ the background color of the text.
  110. A single number \fIN\fP is the same as \fIN.0\fP.
  111. .IP -e
  112. Causes
  113. -.I less
  114. +.I cless
  115. to automatically exit
  116. the second time it reaches end-of-file.
  117. By default, the only way to exit
  118. -.I less
  119. +.I cless
  120. is via the "q" command.
  121. .IP -E
  122. Causes
  123. -.I less
  124. +.I cless
  125. to automatically exit the first time it reaches end-of-file.
  126. .IP -f
  127. Forces non-regular files to be opened.
  128. (A non-regular file is a directory or a device special file.)
  129. Also suppresses the warning message when a binary file is opened.
  130. By default,
  131. -.I less
  132. +.I cless
  133. will refuse to open non-regular files.
  134. .IP -g
  135. Normally,
  136. -.I less
  137. +.I cless
  138. will highlight ALL strings which match the last search command.
  139. The -g flag changes this behavior to highlight only the particular string
  140. which was found by the last search command.
  141. This can cause
  142. -.I less
  143. +.I cless
  144. to run somewhat faster than the default.
  145. .IP -G
  146. The -G flag suppresses all highlighting of strings found by search commands.
  147. @@ -519,32 +519,32 @@ fourth line on the screen, so searches begin at the fi
  148. on the screen.
  149. .IP -k\fIfilename\fP
  150. Causes
  151. -.I less
  152. +.I cless
  153. to open and interpret the named file as a
  154. -.I lesskey
  155. +.I clesskey
  156. (1) file.
  157. Multiple -k options may be specified.
  158. -If a file called .less exists in the user's home directory, this
  159. +If a file called .cless exists in the user's home directory, this
  160. file is also used as a
  161. -.I lesskey
  162. +.I clesskey
  163. file.
  164. .IP -m
  165. Causes
  166. -.I less
  167. +.I cless
  168. to prompt verbosely (like \fImore\fP),
  169. with the percent into the file.
  170. By default,
  171. -.I less
  172. +.I cless
  173. prompts with a colon.
  174. .IP -M
  175. Causes
  176. -.I less
  177. +.I cless
  178. to prompt even more verbosely than
  179. .I more.
  180. .IP -n
  181. Suppresses line numbers.
  182. The default (to use line numbers) may cause
  183. -.I less
  184. +.I cless
  185. to run more slowly in some cases, especially with a very large input file.
  186. Suppressing line numbers with the -n flag will avoid this problem.
  187. Using line numbers means: the line number will be displayed in the verbose
  188. @@ -556,12 +556,12 @@ Causes a line number to be displayed at the beginning
  189. each line in the display.
  190. .IP -o\fIfilename\fP
  191. Causes
  192. -.I less
  193. +.I cless
  194. to copy its input to the named file as it is being viewed.
  195. This applies only when the input file is a pipe,
  196. not an ordinary file.
  197. If the file already exists,
  198. -.I less
  199. +.I cless
  200. will ask for confirmation before overwriting it.
  201. .IP -O\fIfilename\fP
  202. The -O option is like -o, but it will overwrite an existing
  203. @@ -569,23 +569,23 @@ file without asking for confirmation.
  204. .sp
  205. If no log file has been specified,
  206. the -o and -O options can be used from within
  207. -.I less
  208. +.I cless
  209. to specify a log file.
  210. Without a file name, they will simply report the name of the log file.
  211. The "s" command is equivalent to specifying -o from within
  212. -.I less.
  213. +.I cless.
  214. .IP -p\fIpattern\fP
  215. The -p option on the command line is equivalent to
  216. specifying +/\fIpattern\fP;
  217. that is, it tells
  218. -.I less
  219. +.I cless
  220. to start at the first occurrence of \fIpattern\fP in the file.
  221. .IP -P\fIprompt\fP
  222. Provides a way to tailor the three prompt
  223. styles to your own preference.
  224. This option would normally be put in the LESS environment
  225. variable, rather than being typed in with each
  226. -.I less
  227. +.I cless
  228. command.
  229. Such an option must either be the last option in the LESS variable,
  230. or be terminated by a dollar sign.
  231. @@ -613,7 +613,7 @@ Causes "raw" control characters to be displayed.
  232. The default is to display control characters using the caret notation;
  233. for example, a control-A (octal 001) is displayed as "^A".
  234. Warning: when the -r flag is used,
  235. -.I less
  236. +.I cless
  237. cannot keep track of the actual appearance of the screen
  238. (since this depends on how the screen responds to
  239. each type of control character).
  240. @@ -638,10 +638,10 @@ current directory, which was previously built by the
  241. .I ctags
  242. (1) command.
  243. This option may also be specified from within
  244. -.I less
  245. +.I cless
  246. (using the \- command) as a way of examining a new file.
  247. The command ":t" is equivalent to specifying -t from within
  248. -.I less.
  249. +.I cless.
  250. .IP -T\fItagsfile\fP
  251. Specifies a tags file to be used instead of "tags".
  252. .IP -u
  253. @@ -667,7 +667,7 @@ Text which is overstruck or underlined can be searched
  254. if neither -u nor -U is in effect.
  255. .IP -V
  256. Displays the version number of
  257. -.I less.
  258. +.I cless.
  259. .IP -w
  260. Causes blank lines to be used to represent lines
  261. past the end of the file.
  262. @@ -705,9 +705,9 @@ the scrolling window automatically changes to 36 lines
  263. .IP +
  264. If a command line option begins with \fB+\fP,
  265. the remainder of that option is taken to be an initial command to
  266. -.I less.
  267. +.I cless.
  268. For example, +G tells
  269. -.I less
  270. +.I cless
  271. to start at the end of the file rather than the beginning,
  272. and +/xyz tells it to start at the first occurrence of "xyz" in the file.
  273. As a special case, +<number> acts like +<number>g;
  274. @@ -777,25 +777,25 @@ other than ^U, that character is used instead of ^U.
  275. .SH "KEY BINDINGS"
  276. You may define your own
  277. -.I less
  278. +.I cless
  279. commands by using the program
  280. -.I lesskey
  281. +.I clesskey
  282. (1)
  283. -to create a file called ".less" in your home directory.
  284. +to create a file called ".cless" in your home directory.
  285. This file specifies a set of command keys and an action
  286. associated with each key.
  287. You may also use
  288. -.I lesskey
  289. +.I clesskey
  290. to change the line-editing keys (see LINE EDITING).
  291. See the
  292. -.I lesskey
  293. +.I clesskey
  294. manual page for more details.
  295. .SH "INPUT PREPROCESSOR"
  296. You may define an "input preprocessor" for
  297. -.I less.
  298. +.I cless.
  299. Before
  300. -.I less
  301. +.I cless
  302. opens a file, it first gives your input preprocessor a chance to modify the
  303. way the contents of the file are displayed.
  304. An input preprocessor is simply an executable program (or shell script),
  305. @@ -805,7 +805,7 @@ The contents of the replacement file are then displaye
  306. in place of the contents of the original file.
  307. However, it will appear to the user as if the original file is opened;
  308. that is,
  309. -.I less
  310. +.I cless
  311. will display the original filename as the name of the current file.
  312. .PP
  313. An input preprocessor receives one command line argument, the original filename,
  314. @@ -813,7 +813,7 @@ as entered by the user.
  315. It should create the replacement file, and when finished,
  316. print the name of the replacement file to its standard output.
  317. If the input preprocessor does not output a replacement filename,
  318. -.I less
  319. +.I cless
  320. uses the original file, as normal.
  321. The input preprocessor is not called when viewing standard input.
  322. To set up an input preprocessor, set the LESSOPEN environment variable
  323. @@ -823,7 +823,7 @@ which will be replaced by the filename
  324. when the input preprocessor command is invoked.
  325. .PP
  326. When
  327. -.I less
  328. +.I cless
  329. closes a file opened in such a way, it will call another program,
  330. called the input postprocessor,
  331. which may perform any desired clean-up action (such as deleting the
  332. @@ -839,24 +839,24 @@ which was output by LESSOPEN.
  333. .PP
  334. For example, on many Unix systems, these two scripts will allow you
  335. to keep files in compressed format, but still let
  336. -.I less
  337. +.I cless
  338. view them directly:
  339. .PP
  340. -lessopen.sh:
  341. +clessopen.sh:
  342. .br
  343. #! /bin/sh
  344. .br
  345. case "$1" in
  346. .br
  347. - *.Z) uncompress -c $1 >/tmp/less.$$ 2>/dev/null
  348. + *.Z) uncompress -c $1 >/tmp/cless.$$ 2>/dev/null
  349. .br
  350. - if [ -s /tmp/less.$$ ]; then
  351. + if [ -s /tmp/cless.$$ ]; then
  352. .br
  353. - echo /tmp/less.$$
  354. + echo /tmp/cless.$$
  355. .br
  356. else
  357. .br
  358. - rm -f /tmp/less.$$
  359. + rm -f /tmp/cless.$$
  360. .br
  361. fi
  362. .br
  363. @@ -878,7 +878,7 @@ to accept other types of compressed files, and so on.
  364. .PP
  365. It is also possible to set up an input preprocessor to
  366. pipe the file data directly to
  367. -.I less,
  368. +.I cless,
  369. rather than putting the data into a replacement file.
  370. This avoids the need to decompress the entire file before
  371. starting to view it.
  372. @@ -888,7 +888,7 @@ its standard output,
  373. writes the entire contents of the replacement file on its standard output.
  374. If the input pipe does not write any characters on its standard output,
  375. then there is no replacement file and
  376. -.I less
  377. +.I cless
  378. uses the original file, as normal.
  379. To use an input pipe,
  380. make the first character in the LESSOPEN environment variable a
  381. @@ -950,7 +950,7 @@ Selects a Russian character set.
  382. Selects a character set appropriate for NeXT computers.
  383. .PP
  384. In special cases, it may be desired to tailor
  385. -.I less
  386. +.I cless
  387. to use a character set other than the ones definable by LESSCHARSET.
  388. In this case, the environment variable LESSCHARDEF can be used
  389. to define a character set.
  390. @@ -983,7 +983,7 @@ If neither LESSCHARSET nor LESSCHARDEF is set,
  391. but your system supports the
  392. .I setlocale
  393. interface,
  394. -.I less
  395. +.I cless
  396. will use setlocale to determine the character set.
  397. setlocale is controlled by setting the LANG or LC_CTYPE environment variables.
  398. .PP
  399. @@ -1173,14 +1173,14 @@ LINES and COLUMNS environment variables.)
  400. .IP EDITOR
  401. The name of the editor (used for the v command).
  402. .IP HOME
  403. -Name of the user's home directory (used to find a .less file).
  404. +Name of the user's home directory (used to find a .cless file).
  405. .IP LANG
  406. Language for determining the character set.
  407. .IP LC_CTYPE
  408. Language for determining the character set.
  409. .IP LESS
  410. Flags which are passed to
  411. -.I less
  412. +.I cless
  413. automatically.
  414. .IP LESSBINFMT
  415. Format for displaying non-printable, non-control characters.
  416. @@ -1204,13 +1204,14 @@ Takes precedence over the number of lines specified by
  417. The shell used to execute the ! command, as well as to expand filenames.
  418. .IP TERM
  419. The type of terminal on which
  420. -.I less
  421. +.I cless
  422. is being run.
  423. .IP VISUAL
  424. The name of the editor (used for the v command).
  425. .SH "SEE ALSO"
  426. -lesskey(1)
  427. +clesskey(1)
  428. +less(1)
  429. .SH WARNINGS
  430. The = command and prompts (unless changed by -P)