nodejsscript • Docs
nodejsscript / s / $
$(
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
• 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)
$():
ShellString