vim-dispatch
vim-dispatch copied to clipboard
Support commands with output flushing (e.g. progress-bars)
If you run a command (for example a rake task with a progress bar) that output will be sent into the resulting buffer for every flush.
In my case I used the gem rails_best_practices.
The output looks something like this:

Do you have any ideas for what can be done about this?
Unfortunately not at this point, I'm not even sure if it is even technically possible, just throwing it out there in hopes someone might have an idea about it.
Actually the general solution is for such commands not to show progress bars unless connected to a terminal. Though the tmux adapter arranges for a terminal to be present so it needs special casing. It seems like it would be feasible to strip out the garbage after the fact, but someone needs to figure out the rules for doing so based on escape codes.
Can't it be made to bypass the quickfix window all together if maybe a flag is passed? That way one could still just see the actual command in say tmux but the quickfix window wouldn't be filled with garbage after running a command. I'm not sure if this is more difficult than I anticipate it to be, it would be cool :)
Aren't you worried that you might miss an error? I would think a less drastic solution would be just to provide an error format that filters out the progress bar noise.
My use case at the moment isn't particularly focussed on finding errors within generated output of my command as all it does is return color coded garbage. I do believe it's only an edge case and not many people will run into this issue anyways and I'm not even sure if it fits the intended use case of Dispatch to run a command (visible in the bottom split - I'm running tmux as well) without capturing its output.
Thanks for the swift response, I will definitely give the error format trick a try as it sounds like it will work and this would indeed be the less drastic approach for solving this!
Can't help myself but to go off-topic and say I love your works, thank you for providing them :)
Cheers!