#!/usr/bin/env ruby
# encoding: utf-8
require 'minitest/autorun'
require 'fileutils'
DEFAULT_TIMEOUT = 20
FILE = File.expand_path(__FILE__)
base = File.expand_path('../../', __FILE__)
Dir.chdir base
FZF = "FZF_DEFAULT_OPTS= FZF_DEFAULT_COMMAND= #{base}/bin/fzf"
class NilClass
def include? str
false
end
def start_with? str
false
end
def end_with? str
false
end
end
def wait
since = Time.now
while Time.now - since < DEFAULT_TIMEOUT
return if yield
sleep 0.05
end
raise 'timeout'
end
class Shell
class << self
def