Skip to content

Commit

Permalink
Test implementation of pipesplit, see elves/elvish#500 for context an…
Browse files Browse the repository at this point in the history
…d discussion
  • Loading branch information
zzamboni committed Oct 12, 2017
1 parent 463eec3 commit 7bda88d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .elvish/rc.elv
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,21 @@ fn cdb [p]{ cd (dirname $p) }
E:LESS = "-i -R"
E:GOPATH = ~/Personal/devel/go/
E:EDITOR = "vim"

paths = [ $@paths $E:GOPATH/bin ]

fortune | lolcat
fn pipesplit [l1 l2 l3]{
pout = (pipe)
perr = (pipe)
run-parallel {
$l1 > $pout 2> $perr
pwclose $pout
pwclose $perr
} {
$l2 < $pout
prclose $pout
} {
$l3 < $perr
prclose $perr
}
}

0 comments on commit 7bda88d

Please sign in to comment.