-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
/
Copy pathtokei.ts
109 lines (107 loc) · 2.74 KB
/
tokei.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
const languageGenerator: Fig.Generator = {
script: ["tokei", "--languages"],
splitOn: "\n",
};
const compleation: Fig.Spec = {
name: "tokei",
description: "Count your code, quickly",
options: [
{
name: ["-f", "--files"],
description: "Will print out statistics on individual files",
},
{
name: ["-h", "--help"],
description: "Prints help information",
},
{
name: "--hidden",
description: "Count hidden files",
},
{
name: ["-l", "--languages"],
description: "Prints out supported languages and their extensions",
},
{
name: "--no-ignore",
description: "Don't respect ignore files (.gitignore, .ignore, etc.)",
},
{
name: "--no-ignore-dot",
description:
"Don't respect .ignore and .tokeignore files, including those in parent directories",
},
{
name: "--no-ignore-parent",
description:
"Don't respect ignore files (.gitignore, .ignore, etc.) in parent directories",
},
{
name: "--no-ignore-vcs",
description:
"Don't respect VCS ignore files (.gitignore, .hgignore, etc.), including those in parent directories",
},
{
name: ["-V", "--version"],
description: "Prints version information",
},
{
name: ["-v", "--verbose"],
description: "Set log output level:",
isRepeatable: 3,
},
{
name: ["-c", "--columns"],
description:
"Sets a strict column width of the output, only available for terminal output",
args: {
name: "columns",
},
},
{
name: ["-e", "--exclude"],
description: "Ignore all files & directories matching the pattern",
isRepeatable: true,
args: {
name: "exclude",
template: "filepaths",
},
},
{
name: ["-i", "--input"],
description:
'Gives statistics from a previous tokei run. Can be given a file path, or "stdin" to read from stdin',
args: {
name: "input",
suggestions: ["stdin"],
template: "filepaths",
},
},
{
name: ["-o", "--output"],
description: "Outputs Tokei in a specific format",
args: {
name: "output",
suggestions: ["cbor", "json", "yaml"],
},
},
{
name: ["-s", "--sort"],
description: "Sort languages based on column",
args: {
name: "sort",
suggestions: ["files", "lines", "blanks", "code", "comments"],
},
},
{
name: ["-t", "--type"],
description:
"Filters output by language type, seperated by a comma. i.e. -t=Rust,Markdown",
args: {
name: "type",
generators: languageGenerator,
},
},
],
};
export default compleation;