mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-22 20:39:17 +08:00
adding function definition for shelljs set function
http://documentup.com/shelljs/shelljs#setoptions
This commit is contained in:
6
types/shelljs/index.d.ts
vendored
6
types/shelljs/index.d.ts
vendored
@@ -417,6 +417,12 @@ export function touch(files: string[]): void;
|
||||
export function touch(options: TouchOptionsLiteral, ...files: Array<string | string[]>): void;
|
||||
export function touch(options: TouchOptionsArray, ...files: Array<string | string[]>): 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 {
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user