Skip to main content
Module

x/johnny_decimal/commands/open.ts

Utilities for interacting with a Johnny Decimal filing system.
Go to Latest
File
import { Command } from "../models/command.ts";import { Directory } from "../models/directory.ts";
/** * @description Opens a location using the default file explorer * @todo make this work in windows. */const openCommand: Command = { name: "open",
async fn(this: Directory, [str]: string[] = []) { const [location] = await this.findLocationsById(str);
await Deno.run({ cmd: ["open", "-a", "Finder", location.path], stdin: "piped", stdout: "piped", stderr: "piped", }).status(); },};
export default openCommand;