nodejsscript • Docs
nodejsscript / s / XargsFunction
XargsFunction<
T
>(options
,cmd
, ...cmd_args
):ReturnType
<T
>
Works as xargs
in bash, only -I
option is supported.
s.run("git branch --show-current").xargs(s.run, "dep deploy --branch={}");
s.run("git branch --show-current").xargs({ "-I": "§" }, s.run, "dep deploy --branch=§");
xarg() by default escapes piped string, this can be off by passing -R
option.
• T extends (...args
) => any
• options: XargsOptions
Defaults to -I {}
• cmd: T
ShellJS method from ShellReturnValue
• ...cmd_args: Parameters
<T
>
Arguments for cmd
ReturnType
<T
>
Result of cmd
XargsFunction<
T
>(cmd
, ...cmd_args
):ReturnType
<T
>
• T extends (...args
) => any
• cmd: T
• ...cmd_args: Parameters
<T
>
ReturnType
<T
>