UNPKG

detect-shells

Version:

Detect shells installed on a system

17 lines (16 loc) 923 B
import * as Darwin from './darwin'; import * as Win32 from './win32'; import * as Linux from './linux'; import { IFoundShell } from './found-shell'; export declare type Shell = Darwin.Shell | Win32.Shell | Linux.Shell; export declare type FoundShell = IFoundShell<Shell>; /** The default shell. */ export declare const Default: Darwin.Shell | Win32.Shell | Linux.Shell; /** Parse the label into the specified shell type. */ export declare function parse(label: string): Shell; /** Get the shells available for the user. */ export declare function getAvailableShells(): Promise<ReadonlyArray<FoundShell>>; /** Find the given shell or the default if the given shell can't be found. */ export declare function findShellOrDefault(shell: Shell): Promise<FoundShell>; /** Launch the given shell at the path. */ export declare function launchShell(shell: FoundShell, path: string, onError: (error: Error) => void): Promise<void>;