Skip to content

Commit a91bdae

Browse files
committed
rename espanso func to espansoCli
1 parent ede3227 commit a91bdae

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

extensions/espanso/src/disable.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { showHUD } from "@raycast/api";
2-
import { espanso } from "./lib/espanso";
2+
import { espansoCli } from "./lib/espanso";
33

44
export default async function main() {
55
try {
6-
await espanso("cmd disable");
6+
await espansoCli("cmd disable");
77
await showHUD("Espanso disabled");
88
} catch (error) {
99
await showHUD(`Error: ${error}`);

extensions/espanso/src/enable.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { showHUD } from "@raycast/api";
2-
import { espanso } from "./lib/espanso";
2+
import { espansoCli } from "./lib/espanso";
33

44
export default async function main() {
55
try {
6-
await espanso("cmd enable");
6+
await espansoCli("cmd enable");
77
await showHUD("Espanso enabled");
88
} catch (error) {
99
await showHUD(`Error: ${error}`);

extensions/espanso/src/lib/espanso.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function execAsync(command: string): Promise<{ stdout: string; stderr: string }>
1414
});
1515
}
1616

17-
export async function espanso(args: string) {
17+
export async function espansoCli(args: string) {
1818
const preferences = getPreferenceValues<Preferences>();
1919

2020
const espansoPath: string = preferences.espansoPath?.length

extensions/espanso/src/lib/utils.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import fs from "node:fs";
22
import path from "path";
33
import { EspansoMatch, MultiTrigger, Label, Replacement, NormalizedEspansoMatch, EspansoConfig } from "./types";
44
import YAML from "yaml";
5-
import { espanso } from "./espanso";
5+
import { espansoCli } from "./espanso";
66

77
function lastUpdatedDate(file: string) {
88
const { mtime } = fs.statSync(file);
@@ -98,7 +98,7 @@ export async function getEspansoConfig(): Promise<EspansoConfig> {
9898
match: "",
9999
};
100100

101-
const { stdout: configString } = await espanso("path");
101+
const { stdout: configString } = await espansoCli("path");
102102

103103
configString.split("\n").forEach((item) => {
104104
const [key, value] = item.split(":");

extensions/espanso/src/toggle.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { showHUD } from "@raycast/api";
2-
import { espanso } from "./lib/espanso";
2+
import { espansoCli } from "./lib/espanso";
33

44
export default async function main() {
55
try {
6-
await espanso("cmd toggle");
6+
await espansoCli("cmd toggle");
77
await showHUD("Espanso toggled");
88
} catch (error) {
99
await showHUD(`Error: ${error}`);

0 commit comments

Comments
 (0)