Prompt generally signals that the shell is ready
What do you think of this (hopefully) simplified tmux.prepare? (relying on the prompt to signal that the shell is ready)
I don't think repeating tmux.until { |lines| lines[-1] == '$' } instead of tmux.prepare is an improvement. We can change the implementation of tmux.prepare method to rely on $ prompt (which is probably a more robust way to check) but removing the layer of abstraction is not something we should do.
And it looks like you did a bunch of additional refactorings here, which is nice, but it's a different concern, so it should be in a separate commit (or in a separate pull request).
:+1: Will do: I've replaced tmux.until { |lines| lines[-1] == '$' } with tmux.prepare and split apart changes that stand on their own.
I just triggered a rebuild on Travis CI, but it failed this time.
- https://travis-ci.org/junegunn/fzf/jobs/659950165#L693-L698
So aside from the refactorings, I'm not convinced that the change proposed here reduces the probability of intermittent failures. Whether we like it or not, we'll have to live with a bunch of retries and "prepares".
I'm not convinced that the change proposed here reduces the probability of intermittent failures.
I think I've fixed it: The loop below now runs for 50 minutes without failing (it exhausts the Travis CI job time limit): https://travis-ci.org/github/jablko/fzf/builds/670342136
Would you consider giving it another look?
while ruby test/test_go.rb --verbose; do :; done
I've rebased this change and confirmed that an indefinite loop still exhausts the job time limit without failing: https://travis-ci.org/github/jablko/fzf/builds/670732268