-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathchange-font.ts
37 lines (32 loc) · 880 Bytes
/
change-font.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
import { Command } from "@oclif/command";
import { bearExec } from "../utils/bear-exec";
import cmdFlags from "../utils/flags";
import { argsWithPipe } from "../utils/read-pipe";
export default class ChangeFont extends Command {
static description = "Change the selected Bear Font.";
static flags = {
help: cmdFlags.help,
"show-window": cmdFlags["show-window"]
};
static args = [
{
name: "font",
description: "font name",
available: [
"Avenir Next",
"System",
"Helvetica Neue",
"Menlo",
"Georgia",
"Courier",
"Open Dyslexic"
]
}
];
async run() {
const { args: cmdArgs, flags } = this.parse(ChangeFont);
const args = await argsWithPipe(ChangeFont.args, cmdArgs, true);
const params = { ...flags, ...args };
await bearExec("change-font", params);
}
}