UNPKG

1.26 kBTypeScriptView Raw
1/**
2 * The machine name. Calls hostname if not found.
3 */
4export function hostname(cb?: (hostname: string, error?: string) => void): string;
5
6/**
7 * The currently logged-in user. Calls whoami if not found.
8 */
9export function user(cb?: (user: string, error?: string) => void): string;
10
11/**
12 * Either PS1 on unix, or PROMPT on Windows.
13 */
14export function prompt(cb?: (prompt: string, error?: string) => void): string;
15
16/**
17 * The place where temporary files should be created.
18 */
19export function tmpdir(cb?: (tmpdir: string, error?: string) => void): string;
20
21/**
22 * No place like it.
23 */
24export function home(cb?: (home: string, error?: string) => void): string;
25
26/**
27 * An array of the places that the operating system will search for executables.
28 */
29export function path(cb?: (path: string, error?: string) => void): string;
30
31/**
32 * Return the executable name of the editor program.
33 * This uses the EDITOR and VISUAL environment variables,
34 * and falls back to vi on Unix, or notepad.exe on Windows.
35 */
36export function editor(cb?: (editor: string, error?: string) => void): string;
37
38/**
39 * The SHELL on Unix, which Windows calls the ComSpec.
40 * Defaults to 'bash' or 'cmd'.
41 */
42export function shell(cb?: (shell: string, error?: string) => void): string;