man/cline.1

Sun, 05 Jul 2026 12:50:42 +0200

author
Mike Becker <universe@uap-core.de>
date
Sun, 05 Jul 2026 12:50:42 +0200
changeset 108
47be4044845b
parent 104
1b7716b156a4
permissions
-rw-r--r--

move release tag

104
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 .TH cline 1 "2026-07-05" "cline 1.6.0" "cline Manual"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2 .SH NAME
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 cline \- count line terminator characters in files
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 .SH SYNOPSIS
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 .B cline
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6 .RI [ Options ]
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 .RI [ Directories... ]
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 .SH DESCRIPTION
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9 .B cline
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 counts the line terminator characters
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 .RB ( \en )
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 within all files in the specified directories.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
13
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
14 If no directory is specified,
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
15 .B cline
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
16 scans the current directory.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
17 .SH OPTIONS
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
18 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
19 .BI \-b " level"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
20 Set the binary file heuristics level. The default is
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
21 .BR medium .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
22 Valid levels are:
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
23 .BR ignore ,
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
24 .BR low ,
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
25 .BR medium ,
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
26 and
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
27 .BR high .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
28 The heuristics use the ratio of non-printable characters after seeing
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
29 enough printable characters in the file (see
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
30 .MR isprint 3 ).
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
31 The higher the detection level, the
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
32 more printable characters the algorithm wants to see before making a decision.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
33
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
34 Note that some Unicode files with a high ratio of non-printable
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
35 characters from the perspective of
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
36 .MR isprint 3 ,
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
37 might be misdetected by this algorithm as binary files.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
38 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
39 .B \-c
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
40 Count non-whitespace characters instead of lines.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
41 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
42 .B \-d
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
43 Report only directory sums.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
44 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
45 .BI \-D " path"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
46 Exclude the directory at the specified
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
47 .IR path .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
48 A path can be relative or absolute but must always contain at least one path
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
49 separator. For example, if you want to exclude the top-level
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
50 .IR target
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
51 directory in a project of yours, use
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
52 .BI \-D " ./target"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
53 to specify a path relative to your current directory. If you just write
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
54 .BI \-D " target"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
55 you would exclude
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
56 .IR all
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
57 directories with that name in an recursive search with the
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
58 .BR -r
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
59 option.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
60 This option may be used multiple times.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
61 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
62 .BI \-D " name"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
63 Exclude all directories with the given
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
64 .IR name .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
65 This option may be used multiple times.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
66 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
67 .BI \-E " pattern"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
68 Exclude any line matching the regular expression
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
69 .IR pattern .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
70 This option may be used multiple times.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
71 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
72 .BI \-e " start end"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
73 Exclude lines between the regular expressions
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
74 .I start
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
75 and
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
76 .IR end .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
77 The first and the last line are only excluded when they completely match the
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
78 .IR start " or " end
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
79 pattern, respectively.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
80 Similarly, when used with the
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
81 .BR \-c
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
82 option, characters within a line before
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
83 .IR start
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
84 matches and after
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
85 .IR end
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
86 matches are still counted.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
87 This option may be used multiple times.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
88 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
89 .BR \-h ", " \-\-help
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
90 Print help text and exit.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
91 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
92 .B \-i
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
93 Print individual sums per file extension.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
94 This option cannot be used together with
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
95 .BR \-V .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
96 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
97 .B \-m
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
98 Print information about matching files only.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
99 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
100 .BI \-s " suffixes"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
101 Only count files with these suffixes.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
102 Suffixes are separated by commas.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
103 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
104 .BI \-S " suffixes"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
105 Count any file except those with these suffixes.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
106 Suffixes are separated by commas.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
107 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
108 .BR \-r ", " \-R
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
109 Scan subdirectories recursively.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
110 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
111 .BR \-v ", " \-\-version
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
112 Print version information.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
113 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
114 .B \-V
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
115 Turn verbose output off and print the result only.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
116 .SH SHORTCUTS
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
117 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
118 .B \-\-exclude\-cstyle\-comments
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
119 Equivalent to:
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
120 .BR "\-E '\es*//'" " " "\-e '\es*/\e*' '\e*/\es*'"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 .B \-\-exclude\-blank\-lines
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 Equivalent to:
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 .BR "\-E '^\es*$'"
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 .SH EXAMPLES
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 .B cline \-rms .c,.h \-\-exclude\-cstyle\-comments
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 Recursively count matching
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 .I .c
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 and
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 .I .h
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 files, print matching files only, and exclude C-style comments.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 .B cline \-Vc src
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 Print only the total number of non-whitespace characters in
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 .IR src .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 .B cline \-rms .rs \-D ./target
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 Recursively count matching Rust source files starting with the current
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 directory, but skip the target directory. Print only matching files.
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141 .TP
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142 .B cline \-rb high -d -D .git
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 Recursively count all non-binary files with a high binary file detection
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 heuristic. Report only sums per directory and skip all directories with the
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 name
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146 .IR .git .
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147 .SH SEE ALSO
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 .UR https://uap-core.de/man/cline.html
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 https://uap-core.de/man/cline.html
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
150 .UE
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
152 .UR https://uap-core.de/hg/cline
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
153 https://uap-core.de/hg/cline
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
154 .UE
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
155
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
156 .UR https://sourceforge.net/projects/cline/
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
157 https://sourceforge.net/projects/cline/
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
158 .UE
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
159 .SH AUTHOR
1b7716b156a4 add man page and fix uwproj config
Mike Becker <universe@uap-core.de>
parents:
diff changeset
160 Copyright 2018 Mike Becker.

mercurial