tabs [-n | --file [[-code] | -a | -a2 | -c | -c2 | -c3 | -f | -p | -s | -u]]
[+m [n]] [-T type]
选项
-T type
|
告诉选项卡使用哪种终端类型。如果未提供此选项,则选项卡将使用TERM 环境变量。如果未设置,它将使用“ ansi + tabs”标准,该标准将在许多常见的终端类型上正常工作。
|
-d
|
此调试选项显示标尺行,后跟两条数据行。第一行数据显示了预期的带有星号的制表位。第二个数据行显示实际的制表位,并标有星号。
|
- n
|
重复规范要求在1+ n,1 + 2 * n等列中使用制表符,其中n是一位数字的十进制数字。特别重要的是值8:它表示UNIX系统的“标准”选项卡设置,并且是最有可能在终端上找到的选项卡设置。使用-0时,制表符停止位被清除,并且没有设置新的制表符。
|
- file
|
如果提供了文件文件名,则制表符将读取文件的第一行,以搜索格式说明。如果在此找到一个,则根据它设置制表位;否则将它们设置为-8。
|
+ m [ n ]
|
margin参数可用于某些终端。通过使列n +1成为左边距,可将所有选项卡移到n列上。如果给出的+ m值不为n,则假定值为10。大多数终端上的正常(最左侧)边距由+ m0获得。仅当显式给出+ m标志时,才会重置大多数终端的边距。
|
-code
|
使用预定义的制表位列表来编写代码。请参阅下面的“ 预定义的标签停止列表”。
|
该tabs程序处理制表位的一个列表。定义列表的最后一个要处理的选项是确定要处理的列表的那个。
显式选项卡停止列表
可以在选项之后定义显式列表(此列表不使用“ - ”)。列表中的值必须以递增的数字顺序且大于零。它们之间用逗号或空格隔开,例如,
tabs 1,6,11,16,21
tabs 1 6 11 16 21
使用“ + ”将数字视为相对于先前值的增量,例如,
tabs 1,+ 5,+ 5,+ 5,+ 5
...相当于1,6,11,16,21示例。
预定义的制表位列表
X / Open标准为某些编码样式定义了多个制表位的预定义列表,可以使用以下-code选项进行设置:
选项
|
制表位定义
|
编码风格
|
-a
|
1,10,16,36,72
|
汇编程序,IBM S / 370,第一种格式
|
-a2
|
1,10,16,40,72
|
汇编程序,IBM S / 370,第二种格式
|
-C
|
1,8,12,16,20,55
|
COBOL,正常的格式
|
-c2
|
1,6,10,14,49
|
COBOL紧凑格式
|
-c3
|
1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
|
扩展了COBOL紧凑格式
|
-F
|
1,7,11,15,19,23
|
FORTRAN
|
-p
|
1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
|
PL / I
|
-s
|
1,10,55
|
SNOBOL
|
-u
|
1,12,20,44
|
UNIVAC 1100组装机
|
tabs [-n | --file [[-code] | -a | -a2 | -c | -c2 | -c3 | -f | -p | -s | -u]]
[+m [n]] [-T type]
Options
-Ttype
|
Tell tabs which terminal type to use. If this option is not given, tabs will use the TERM environment variable. If that is not set, it will use the "ansi+tabs" standard which will work well on many common terminal types.
|
-d
|
This debugging option shows a ruler line, followed by two data lines. The first data line shows the expected tab stops marked with asterisks. The second data line shows the actual tab stops, marked with asterisks.
|
-n
|
A repetitive specification requests tabs at columns 1+n, 1+2*n, etc., where n is a single-digit decimal number. Of particular importance is the value 8: this represents the UNIX system "standard" tab setting, and is the most likely tab setting to be found at a terminal. When -0 is used, the tab stops are cleared and no new ones are set.
|
-file
|
If the name of a file file is given, tabs reads the first line of the file, searching for a format specification. If it finds one there, it sets the tab stops according to it; otherwise it sets them as -8.
|
+m[n]
|
The margin argument may be used for some terminals. It causes all tabs to be moved over n columns by making column n+1 the left margin. If +m is given without a value of n, the value assumed is 10. The normal (leftmost) margin on most terminals is obtained by +m0. The margin for most terminals is reset only when the +m flag is given explicitly.
|
-code
|
Use a pre-defined tab stop list for writing code. See Pre-Defined Tab Stop Lists, below.
|
The tabs program processes a single list of tab stops. The last option to be processed which defines a list is the one that determines the list to be processed.
Explicit Tab Stop Lists
An explicit list can be defined after the options (this does not use a "-"). The values in the list must be in increasing numeric order, and greater than zero. They are separated by a comma or a blank, for example,
tabs 1,6,11,16,21
tabs 1 6 11 16 21
Use a '+' to treat a number as an increment relative to the previous value, e.g.,
tabs 1,+5,+5,+5,+5
...which is equivalent to the 1,6,11,16,21 example.
Pre-Defined Tab Stop Lists
The X/Open standard defines several pre-defined lists of tab stops for certain coding styles, which can be set using the following -code options:
option
|
tab stop definition
|
coding style
|
-a
|
1,10,16,36,72
|
Assembler, IBM S/370, first format
|
-a2
|
1,10,16,40,72
|
Assembler, IBM S/370, second format
|
-c
|
1,8,12,16,20,55
|
COBOL, normal format
|
-c2
|
1,6,10,14,49
|
COBOL compact format
|
-c3
|
1,6,10,14,18,22,26,30,34,38,42,46,50,54,58,62,67
|
COBOL compact format extended
|
-f
|
1,7,11,15,19,23
|
FORTRAN
|
-p
|
1,5,9,13,17,21,25,29,33,37,41,45,49,53,57,61
|
PL/I
|
-s
|
1,10,55
|
SNOBOL
|
-u
|
1,12,20,44
|
UNIVAC 1100 Assembler
|