pydave/AsyncCommand — Issue #5: Pipe result through sed?
Author: jsholmes
Created: 2011-11-03 14:40:41+00:00
State: open

Because my builds happen in a different directory than where I edit my source, I need to substitute the name of the source directory for the build directory in my build output. To this end, I've got a shellpipe set for normal :make like this:

set shellpipe=\|2>&1\|sed\ 's/^.*build\\///g'\|tee

There is no good way to do this that I can see with AsyncMake. Right now I've just made this hardcoded change, but it would be good if AsyncMake had something like shellpipe that can be configured via an option.

function! s:AsyncMake(target)
- let make_cmd = &makeprg ." ". a:target
+ let make_cmd = &makeprg ." ". a:target . "|sed 's/^.*build\\///'"