diff --git a/types/shelljs/index.d.ts b/types/shelljs/index.d.ts index c425ac6180..8d96561a1d 100644 --- a/types/shelljs/index.d.ts +++ b/types/shelljs/index.d.ts @@ -417,6 +417,12 @@ export function touch(files: string[]): void; export function touch(options: TouchOptionsLiteral, ...files: Array): void; export function touch(options: TouchOptionsArray, ...files: Array): void; +/** + * Sets global configuration variables + * @param options Available options: `+/-e`: exit upon error (`config.fatal`), `+/-v`: verbose: show all commands (`config.verbose`), `+/-f`: disable filename expansion (globbing) + */ +export function set(options: string): void; + // Configuration export interface ShellConfig { diff --git a/types/shelljs/shelljs-tests.ts b/types/shelljs/shelljs-tests.ts index 2e7c5e7e8d..f098e76f7a 100644 --- a/types/shelljs/shelljs-tests.ts +++ b/types/shelljs/shelljs-tests.ts @@ -106,6 +106,13 @@ const childProc = shell.exec("node --version", (code: number) => { }); pid = childProc.pid; +shell.set('+e'); +shell.set('-e'); +shell.set('+v'); +shell.set('-v'); +shell.set('+f'); +shell.set('-f'); + shell.chmod(755, "/Users/brandon"); shell.chmod("755", "/Users/brandon"); // same as above shell.chmod("u+x", "/Users/brandon");