-
-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathindex.d.ts
More file actions
44 lines (33 loc) · 822 Bytes
/
index.d.ts
File metadata and controls
44 lines (33 loc) · 822 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
export type Options = {
/**
The shell to read environment path from.
Default: User's default shell.
*/
readonly shell?: string;
};
/**
Get the `$PATH` from the user's shell.
@returns The `$PATH`.
@example
```
import {shellPath} from 'shell-path';
console.log(await shellPath());
//=> '/usr/local/bin:/usr/bin:...'
console.log(await shellPath({shell: '/bin/bash'}));
//=> '/usr/local/bin:/usr/bin:...'
```
*/
export function shellPath(options?: Options): Promise<string>;
/**
Get the `$PATH` from the user's shell.
@returns The `$PATH`.
@example
```
import {shellPathSync} from 'shell-path';
console.log(shellPathSync());
//=> '/usr/local/bin:/usr/bin:...'
console.log(shellPathSync({shell: '/bin/bash'}));
//=> '/usr/local/bin:/usr/bin:...'
```
*/
export function shellPathSync(options?: Options): string;