forked from withfig/autocomplete
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cal.ts
40 lines (39 loc) · 1.03 KB
/
cal.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
import { monthSuggestions } from "./ncal";
const completionSpec: Fig.Spec = {
name: "cal",
parserDirectives: {
optionsMustPrecedeArguments: true,
},
description: "Displays a calendar and the date of Easter",
args: {
name: "year",
description: "Year to print calendar of",
},
options: [
{
name: "-h",
description: "Turns off highlighting of today",
},
{
name: "-j",
description:
"Display Julian days (days one-based, numbered from January 1)",
},
{
name: "-m",
description:
"Display the specified month. If month is specified as a decimal number, it may be followed by the letter ‘f’ or ‘p’ to indicate the following or preceding month of that number, respectively",
exclusiveOn: ["-y"],
args: {
name: "month",
suggestions: monthSuggestions,
},
},
{
name: "-y",
description: "Display a calendar for the specified year",
exclusiveOn: ["-m"],
},
],
};
export default completionSpec;