Merge pull request #659 from glacambre/fix_composite

excmds.ts: Fix composite
This commit is contained in:
Oliver Blanthorn 2018-06-08 08:35:35 +01:00 committed by GitHub
commit 9f90deef5d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1779,7 +1779,7 @@ export async function composite(...cmds: string[]) {
async (_, cmd) => {
await _
let cmds = cmd.split("|")
let [fn, args] = excmd_parser.parser(cmd)
let [fn, args] = excmd_parser.parser(cmds[0])
return cmds.slice(1).reduce(async (pipedValue, cmd) => {
let [fn, args] = excmd_parser.parser(cmd)
return fn.call({}, ...args, await pipedValue)