OSDN Git Service

Convert release and draft pages to UTF-8.
[linuxjm/jm.git] / manual / GNU_less / draft / man1 / lesskey.1
1 .\"                                                                            
2 .\" Japanese Version Copyright (c) 1999-2000 Yuichi SATO
3 .\"         all rights reserved.                                               
4 .\" Translated Fri Sep 17 03:26:44 JST 1999
5 .\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
6 .\" Modified Wed Jun 28 01:55:54 JST 2000
7 .\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
8 .\" Updated Tue Oct 10 22:29:13 JST 2000
9 .\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
10 .\" Updated Wed Nov 22 05:26:31 JST 2000
11 .\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
12 .\" Modified Fri Dec  1 18:58:22 JST 2000
13 .\"         by Yuichi SATO <sato@complex.eng.hokudai.ac.jp>
14 .\"
15 .\"WORD:        caret           キャレット
16 .\"WORD:        pound sign      シャープ記号
17 .\"
18 .TH LESSKEY 1 "Version 358: 08 Jul 2000"
19 .\"O .SH NAME
20 .SH 名前
21 .\"O lesskey \- specify key bindings for less
22 lesskey \- less のキー割り当てを指定する
23 .\"O .SH SYNOPSIS
24 .SH 書式
25 .B "lesskey [-o output] [--] [input]"
26 .br
27 .B "lesskey [--output=output] [--] [input]"
28 .br
29 .B "lesskey -V"
30 .br
31 .B "lesskey --version"
32 .\"O .SH DESCRIPTION
33 .SH 説明
34 .\"O .I Lesskey
35 .\"O is used to specify a set of key bindings to be used by 
36 .\"O .I less.
37 .\"O The input file is a text file which describes the key bindings,
38 .\"O If the input file is "-", standard input is read.
39 .\"O If no input file is specified, a standard filename is used
40 .\"O as the name of the input file, which depends on the system being used:
41 .I lesskey
42
43 .I less
44 で使われるキー割り当てのセットを指定するために使われる。
45 入力ファイルはキー割り当てを記述したテキストファイルである。
46 入力ファイルが "-" のときは、標準入力が読まれる。
47 入力ファイルが何も指定されないときは、
48 使用しているシステムに応じた
49 標準のファイル名が入力ファイルの名前として使われる。
50 .\"O On Unix systems, $HOME/.lesskey is used;
51 .\"O on MS-DOS systems, $HOME/_lesskey is used;
52 .\"O and on OS/2 systems $HOME/lesskey.ini is used,
53 .\"O or $INIT/lesskey.ini if $HOME is undefined.
54 .\"O The output file is a binary file which is used by 
55 .\"O .I less.
56 Unix では $HOME/.lesskey が使われる。
57 MS-DOS では $HOME/_lesskey が使われる。
58 OS/2 では $HOME/lesskey.ini が使われ、
59 $HOME が定義されないときは $INIT/lesskey.ini が使われる。
60 出力ファイルは
61 .I less
62 で使われるバイナリファイルである。
63 .\"O If no output file is specified, 
64 .\"O and the environment variable LESSKEY is set,
65 .\"O the value of LESSKEY is used as the name of the output file.
66 .\"O Otherwise, a standard filename is used as the name of the output file,
67 .\"O which depends on the system being used:
68 .\"O On Unix and OS-9 systems, $HOME/.less is used;
69 .\"O on MS-DOS systems, $HOME/_less is used;
70 .\"O and on OS/2 systems, $HOME/less.ini is used,
71 .\"O or $INIT/less.ini if $HOME is undefined.
72 .\"O If the output file already exists,
73 .\"O .I lesskey
74 .\"O will overwrite it.
75 出力ファイルが何も指定されておらず、
76 環境変数 LESSKEY が設定されている場合、
77 LESSKEY の値が出力ファイルの名前として使われる。
78 LESSKEY が指定されていない場合は、
79 使用しているシステムに応じた
80 標準のファイル名が出力ファイルの名前として使われる。
81 UNIX と OS-9 では $HOME/.less が使われる。
82 MS-DOS では $HOME/_less  が使われる。
83 OS/2 では $HOME/less.ini が使われ、
84 $HOME が定義されないときは $INIT/less.ini が使われる。
85 出力ファイルが既に存在する場合、
86 .I lesskey
87 は出力ファイルを上書きする。
88 .PP
89 .\"O The -V or --version option causes
90 .\"O .I lesskey
91 .\"O to print its version number and immediately exit.  
92 .\"O If -V or --version is present, other options and arguments are ignored.
93 -V と --version オプションは、
94 .I lesskey
95 にバージョン番号を表示させて、すぐに終了させる。
96 -V または --version オプションが指定された場合、
97 他のオプションと引き数は無視される。
98 .PP
99 .\"O The input file consists of one or more
100 .\"O .I sections.
101 .\"O Each section starts with a line that identifies the type of section.
102 .\"O Possible sections are:
103 .\"O .IP #command
104 .\"O Defines new command keys.
105 .\"O .IP #line-edit
106 .\"O Defines new line-editing keys.
107 .\"O .IP #env
108 .\"O Defines environment variables.
109 入力ファイルは、いくつかの
110 .I セクション
111 から構成される。
112 各セクションは、セクションのタイプを識別する行から始まる。
113 指定できるセクションを以下に示す。
114 .IP #command
115 新しいコマンドラインキーを定義する。
116 .IP #line-edit
117 新しいライン編集キーを定義する。
118 .IP #env
119 環境変数を定義する。
120 .PP
121 .\"O Blank lines and lines which start with a pound sign (#) are ignored,
122 .\"O except for the special section header lines.
123 空白行と特別なセクションヘッダ行を除く、
124 シャープ記号 (#) から始まる行は無視される。
125
126 .\"O .SH "COMMAND SECTION"
127 .SH コマンドセクション
128 .\"O The command section begins with the line
129 コマンドセクションは次の行から始まる。
130 .sp
131 #command
132 .sp
133 .\"O If the command section is the first section in the file,
134 .\"O this line may be omitted.
135 .\"O The command section consists of lines of the form:
136 コマンドセクションがファイルの中での最初のセクションである場合、
137 この行は省略することもできる。
138 コマンドラインセクションは次の形式の行から構成される。
139 .sp
140         \fIstring\fP <whitespace> \fIaction\fP [extra-string] <newline>
141 .sp
142 .\"O Whitespace is any sequence of one or more spaces and/or tabs.
143 .\"O The \fIstring\fP is the command key(s) which invoke the action.
144 .\"O The \fIstring\fP may be a single command key, or a sequence of up to 15 keys.
145 .\"O The \fIaction\fP is the name of the less action, from the list below.
146 .\"O The characters in the \fIstring\fP may appear literally, or be
147 .\"O prefixed by a caret to indicate a control key.
148 .\"O A backslash followed by one to three octal digits may be used to
149 .\"O specify a character by its octal value.
150 .\"O A backslash followed by certain characters specifies input
151 .\"O characters as follows:
152 whitespace (空白) とはスペースとタブを 1 つ以上並べたものである。
153 \fIstring\fP はアクションを起こすコマンドキーである。
154 \fIstring\fP は 1 つのコマンドキー、または 15 個までのキーである。
155 \fIaction\fP は下のリストにある less のアクションである。
156 \fIstring\fP 中の文字はコマンドの文字通り、もしくは、
157 コントロールキーを示すためにキャレット (^) を前において表す。
158 バックスラッシュと、それに続く 3 桁までの 8 進数は、
159 文字を 8 進数で指定するために使われる。
160 .\"A backslash followed by certain characters specifies input
161 .\"characters as follows:
162 バックスラッシュとその後に続く文字により、次のような入力文字を指定する。
163 .IP \eb
164 BACKSPACE
165 .IP \ee
166 ESCAPE
167 .IP \en
168 NEWLINE
169 .IP \er
170 RETURN
171 .IP \et
172 TAB
173 .IP \eku
174 UP ARROW
175 .IP \ekd
176 DOWN ARROW
177 .IP \ekr
178 RIGHT ARROW
179 .IP \ekl
180 LEFT ARROW
181 .IP \ekU
182 PAGE UP
183 .IP \ekD
184 PAGE DOWN
185 .IP \ekh
186 HOME
187 .IP \eke
188 END
189 .IP \ekx
190 DELETE
191 .PP
192 .\"O A backslash followed by any other character indicates that character is
193 .\"O to be taken literally.
194 .\"O Characters which must be preceded by backslash include
195 .\"O caret, space, tab and the backslash itself.
196 バックスラッシュの後に続く上に挙げた以外の文字は、
197 その文字が特殊文字としてでなく、文字通りに使われることを意味している。
198 バックスラッシュを前に置かなければならない文字は、
199 キャレット・スペース・タブ・バックスラッシュ自身である。
200 .PP
201 .\"O An action may be followed by an "extra" string.
202 .\"O When such a command is entered while running
203 .\"O .I less,
204 .\"O the action is performed, and then the extra
205 .\"O string is parsed, just as if it were typed in to
206 .\"O .I less.
207 .\"O This feature can be used in certain cases to extend
208 .\"O the functionality of a command.
209 .\"O For example, see the "{" and ":t" commands in the example below.
210 .\"O The extra string has a special meaning for the "quit" action:
211 .\"O when
212 .\"O .I less
213 .\"O quits, first character of the extra string is used as its exit status.
214 アクションの後に "extra" string を続けることもできる。
215 .I less
216 が実行されているときにそのようなコマンドが入力されると、
217 アクションが実行された後、extra string が
218 .I less
219 で入力されたときと同じように解釈される。
220 この特色はコマンドの機能を拡張する場合に使われる。
221 下の "{" と ":t" コマンドの例を参照すること。
222 アクションが "quit" の場合、extra string は特別な意味を持つ。
223 .I less
224 が終了するとき、extra string の最初の 1 文字が終了ステータスとして使われる。
225
226 .\"O .SH EXAMPLE
227 .SH 例
228 .\"O The following input file describes the set of
229 .\"O default command keys used by less:
230 下の入力ファイルは、less で使われるデフォルトの
231 コマンドキーセットを表している。
232 .sp
233 .nf
234         #command
235         \er             forw-line 
236         \en             forw-line 
237         e               forw-line 
238         j               forw-line 
239         \ekd            forw-line
240         ^E              forw-line 
241         ^N              forw-line 
242         k               back-line 
243         y               back-line 
244         ^Y              back-line 
245         ^K              back-line 
246         ^P              back-line 
247         J               forw-line-force 
248         K               back-line-force 
249         Y               back-line-force 
250         d               forw-scroll 
251         ^D              forw-scroll 
252         u               back-scroll 
253         ^U              back-scroll 
254         \e40            forw-screen 
255         f               forw-screen 
256         ^F              forw-screen 
257         ^V              forw-screen 
258         \ekD            forw-screen
259         b               back-screen 
260         ^B              back-screen 
261         \eev            back-screen 
262         \ekU            back-screen
263         z               forw-window 
264         w               back-window 
265         \ee\e40 forw-screen-force
266         F               forw-forever 
267         R               repaint-flush 
268         r               repaint 
269         ^R              repaint 
270         ^L              repaint 
271         \eeu            undo-hilite
272         g               goto-line 
273         <               goto-line 
274         \ee<            goto-line 
275         p               percent 
276         %               percent 
277         \ee[            left-scroll
278         \ee]            right-scroll
279         \ee(            left-scroll
280         \ee)            right-scroll
281         {               forw-bracket {}
282         }               back-bracket {}
283         (               forw-bracket ()
284         )               back-bracket ()
285         [               forw-bracket []
286         ]               back-bracket []
287         \ee^F           forw-bracket 
288         \ee^B           back-bracket 
289         G               goto-end 
290         \ee>            goto-end 
291         >               goto-end 
292         =               status 
293         ^G              status 
294         :f              status 
295         /               forw-search 
296         ?               back-search 
297         \ee/            forw-search *
298         \ee?            back-search *
299         n               repeat-search 
300         \een            repeat-search-all 
301         N               reverse-search 
302         \eeN            reverse-search-all 
303         m               set-mark 
304         '               goto-mark 
305         ^X^X            goto-mark 
306         E               examine 
307         :e              examine 
308         ^X^V            examine 
309         :n              next-file 
310         :p              prev-file 
311         :x              index-file 
312         -               toggle-option 
313         :t              toggle-option t
314         s               toggle-option o
315         _               display-option 
316         |               pipe 
317         v               visual 
318         !               shell 
319         +               firstcmd 
320         @               rotate-right 
321         H               help 
322         h               help 
323         V               version 
324         0               digit
325         1               digit
326         2               digit
327         3               digit
328         4               digit
329         5               digit
330         6               digit
331         7               digit
332         8               digit
333         9               digit
334         q               quit 
335         Q               quit 
336         :q              quit 
337         :Q              quit 
338         ZZ              quit 
339 .fi
340 .sp
341 .\"O .SH PRECEDENCE
342 .SH 優先順
343 .\"O Commands specified by
344 .\"O .I lesskey
345 .\"O take precedence over the default commands.
346 .\"O A default command key may be disabled by including it in the
347 .\"O input file with the action "invalid".
348 .\"O Alternatively, a key may be defined 
349 .\"O to do nothing by using the action "noaction".
350 .\"O "noaction" is similar to "invalid", but 
351 .\"O .I less
352 .\"O will give an error beep for an "invalid" command, 
353 .\"O but not for a "noaction" command.
354 .\"O In addition, ALL default commands may be disabled by 
355 .\"O adding this control line to the input file:
356 .\"O .sp
357 .\"O #stop
358 .\"O .sp
359 .\"O This will cause all default commands to be ignored.
360 .\"O The #stop line should be the last line in that section of the file.
361 .I lesskey
362 で指定されるコマンドは、デフォルトのコマンドより優先される。
363 action を "invalid" としたコマンドを入力ファイルに入れておくと、
364 デフォルトのコマンドキーを使用不可にすることができる。
365 また、action のところを "noaction" と記述することで、
366 そのキーは何もしないと定義される。
367 "noaction" は "invalid" に似ているが、
368 .I less
369 は "invalid" コマンドに対してエラーのビープ音を鳴らすが、
370 "noaction" コマンドに対しては何もしない。
371 さらに、次のコントロール行を入力ファイルに追加すると、
372 全てのデフォルトのコマンドが不可にできる。
373 .sp
374 #stop
375 .sp
376 これにより、全てのデフォルトコマンドは無視される。
377 #stop 行は、ファイルのそのセクションの最後の行に置かれなければならない。
378 .PP
379 .\"O Be aware that #stop can be dangerous.  
380 .\"O Since all default commands are disabled, 
381 .\"O you must provide sufficient commands before the #stop line
382 .\"O to enable all necessary actions.
383 .\"O For example, failure to provide a "quit" command can lead to frustration.
384 #stop は危険であることを理解しておかなければならない。
385 #stop により全てのデフォルトコマンドが不可にされるので、
386 必要な全てのアクションを可能にするためには
387 #stop 行の前に必要なコマンドを指定しなければならない。
388 例えば、"quit" コマンドを指定しないと使いづらくなる。
389
390 .\"O .SH "LINE EDITING SECTION"
391 .SH ラインエディットセクション
392 .\"O The line-editing section begins with the line:
393 .\"O .sp
394 .\"O #line-edit
395 .\"O .sp
396 .\"O This section specifies new key bindings for the line editing commands,
397 .\"O in a manner similar to the way key bindings for 
398 .\"O ordinary commands are specified in the #command section.
399 .\"O The line-editing section consists of a list of keys and actions,
400 .\"O one per line as in the example below.
401 ラインエディットセクションは次の行で始まる。
402 .sp
403 #line-edit
404 .sp
405 このセクションは、#command セクションで一般のコマンドの新しいキー割り当てを
406 指定したときと同じやりかたで、
407 ラインエディットコマンドの新しいキー割り当てを指定する。
408 ラインエディットセクションは、下の例のように 1 行毎の
409 キーとアクションのリストからなる。
410
411 .\"O .SH EXAMPLE
412 .SH 例
413 .\"O The following input file describes the set of
414 .\"O default line-editing keys used by less:
415 下の入力ファイルは、less で使われる
416 デフォルトのラインエディットキーのセットを記述している。
417 .sp
418 .nf
419         #line-edit
420         \et             forw-complete
421         \e17            back-complete
422         \ee\et          back-complete
423         ^L              expand
424         ^V              literal
425         ^A              literal
426         \eel            right
427         \ekr            right
428         \eeh            left
429         \ekl            left
430         \eeb            word-left
431         \ee\ekl word-left
432         \eew            word-right
433         \ee\ekr word-right
434         \eei            insert
435         \eex            delete
436         \ekx            delete
437         \eeX            word-delete
438         \eekx           word-delete
439         \ee\eb          word-backspace
440         \ee0            home
441         \ekh            home
442         \ee$            end
443         \eke            end
444         \eek            up
445         \eku            up
446         \eej            down
447 .fi
448 .sp
449
450 .\"O .SH "LESS ENVIRONMENT VARIABLES"
451 .SH LESS 環境変数セクション
452 .\"O The environment variable section begins with the line
453 環境変数セクションは次の行から始まる。
454 .sp
455 #env
456 .sp
457 .\"O Following this line is a list of environment variable assignments.
458 .\"O Each line consists of an environment variable name, an equals sign (=)
459 .\"O and the value to be assigned to the environment variable.
460 .\"O White space before and after the equals sign is ignored.
461 .\"O Variables assigned in this way are visible only to
462 .\"O .I less.
463 .\"O If a variable is specified in the system environment and also in a
464 .\"O lesskey file, the value in the lesskey file takes precedence.
465 .\"O Although the lesskey file can be used to override variables set in the
466 .\"O environment, the main purpose of assigning variables in the lesskey file
467 .\"O is simply to have all 
468 .\"O .I less
469 .\"O configuration information stored in one file.
470 この行の後には、環境変数の割り当てリストが続く。
471 各行は、環境変数名・イコール記号 (=)・環境変数に割り当てる値、
472 で構成される。
473 イコール記号の前後の空白は無視される。
474 この方法で割り当てられる変数は、
475 .I less
476 でしか参照されない。
477 ある変数がシステム環境でも lesskey ファイルでも指定されている場合、
478 lesskey ファイルでの値が優先される。
479 lesskey ファイルは環境変数を上書きするために使うこともできるが、
480 lesskey ファイルで環境変数を設定する主な目的は、
481 .I less
482 の全ての設定情報を 1 つのファイルに収めることである。
483
484 .\"O .SH EXAMPLE
485 .SH 例
486 .\"O The following input file sets the -i option whenever 
487 .\"O .I less
488 .\"O is run, and specifies the character set to be "latin1":
489 下の入力ファイルでは、
490 .I less
491 を常に -i オプションをつけて実行し、
492 文字セットを "latin1" にするように指定している。
493 .sp
494 .nf
495         #env
496         LESS = -i
497         LESSCHARSET = latin1
498 .fi
499 .sp
500
501 .\"O .SH "SEE ALSO"
502 .SH 関連項目
503 less(1)
504
505 .\"O .SH WARNINGS
506 .SH 警告
507 .\"O It is not possible to specify special keys, such as uparrow, 
508 .\"O in a keyboard-independent manner.
509 .\"O The only way to specify such keys is to specify the escape sequence
510 .\"O which a particular keyboard sends when such a keys is pressed.
511 上矢印のような特殊キーをキーボードに依存しない方法で指定することは
512 不可能である。
513 そのような特殊キーを指定する唯一の方法は、
514 そのキーが押されたときにキーボードが送るエスケープシーケンスを
515 指定することである。
516 .PP
517 .\"O On MS-DOS and OS/2 systems, certain keys send a sequence of characters
518 .\"O which start with a NUL character (0).
519 .\"O This NUL character should be represented as \e340 in a lesskey file.
520 MS-DOS と OS/2 では、NUL 文字 (0) で始まる文字列を送るキーがある。
521 この NUL 文字は、lesskey ファイルで \e340 と表される。
522
523 .SH 著作権
524 Copyright (C) 2000  Mark Nudelman
525 .PP
526 lesskey is part of the GNU project and is free software;
527 you can redistribute it and/or modify it
528 under the terms of the GNU General Public License as published by
529 the Free Software Foundation;
530 either version 2, or (at your option) any later version.
531 .PP
532 lesskey is distributed in the hope that it will be useful, but
533 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
534 or FITNESS FOR A PARTICULAR PURPOSE.
535 See the GNU General Public License for more details.
536 .PP
537 You should have received a copy of the GNU General Public License 
538 along with lesskey; see the file COPYING.
539 If not, write to the Free Software Foundation, 59 Temple Place,
540 Suite 330, Boston, MA  02111-1307, USA.
541
542 .\"O .SH AUTHOR
543 .SH 著者
544 .PP
545 .\"O Mark Nudelman <marknu@flash.net>
546 .\"O .br
547 .\"O Send bug reports or comments to the above address or to bug-less@gnu.org.
548 Mark Nudelman <marknu@flash.net>
549 .br
550 バグの報告やコメントは、上のアドレスか bug-less@gnu.org へ送って下さい。
551
552 .\"O .SH PATCH
553 .SH パッチ
554 Copyright (c) 1994-2000  Kazushi (Jam) Marukawa, Japanized routines only
555 .br
556 Comments to: jam@pobox.com
557 .br
558 You may distribute under the terms of the Less License.
559 .PP
560 [参考訳]
561 .br
562 Copyright (c) 1994-2000  Kazushi (Jam) Marukawa, 日本語化ルーチンのみ。
563 .br
564 コメントは jam@pobox.com へ送って下さい。
565 .br
566 このパッチは Less ライセンスの下で配布できる。