Skip to content

Latest commit

 

History

History
53 lines (36 loc) · 1.09 KB

File metadata and controls

53 lines (36 loc) · 1.09 KB

nodejsscriptDocs


nodejsscript / s / $

Function: $()

$(options)

$(options): ShellString

Modifies config for next command in chain. The $() runs next command in silent mode:

// comapre bash
var=$(echo Hi)
echo $var
// with
const var= s.$().echo("Hi");
echo(var);

…examples:

const branch= s.$().run("git branch --show-current");
echo(branch);

s.$("-VF").run("gyt branch --show-current");

s.$("-g").rm("*.tx"); //remove only "*.txt" file

Parameters

options: "-f" | "-S" | "-V" | "-F" | "-g" | "-v" | "-s" | "-G"

Options - "-V": verbose - "-S": silent (default) - "-F": fatal - "-G": glob (evaluate * in paths) - to off option(s) use lower-case letters ("-v" no-verbose, "-s" …, …, "-g" noglob)

Returns

ShellString

$()

$(): ShellString

Returns

ShellString