// Name: Add Espanso Trigger
// Description: Adds a new Espanso trigger using selected text as default and prompts to confirm replacement.
// Author: okeefj22
// GitHub: okeefj22
import "@johnlindquist/kit"
import YAML from "yaml"
type EspansoDoc = {
matches?: {
trigger: string
replace: string
}[]
}
const findEspansoDir = async (): Promise<string> => {
const candidates: string[] = []
if (isMac) candidates.push(home("Library", "Application Support", "espanso"))
if (isLinux) candidates.push(home(".config", "espanso"))
if (isWin) {