vim-dispatch icon indicating copy to clipboard operation
vim-dispatch copied to clipboard

Support commands with output flushing (e.g. progress-bars)

Open terlar opened this issue 12 years ago • 6 comments

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: Screen Shot 2013-04-04 at 1 52 55 PM

terlar avatar Apr 04 '13 12:04 terlar

Do you have any ideas for what can be done about this?

tpope avatar Apr 04 '13 15:04 tpope

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.

terlar avatar Apr 04 '13 16:04 terlar

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.

tpope avatar Mar 23 '14 21:03 tpope

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 :)

SidOfc avatar Jul 22 '17 22:07 SidOfc

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.

tpope avatar Jul 23 '17 00:07 tpope

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!

SidOfc avatar Jul 23 '17 14:07 SidOfc