#!/usr/bin/env ruby # frozen_string_literal: true $LOAD_PATH.unshift File.expand_path('../lib', __dir__) require 'tmux-erb-parser' # limit recursive execution command = File.basename(__FILE__) processes = `ps axo command` exit 1 if processes.grep(/\Aruby.+#{command}/).size > 5 cmd = TmuxERBParser::Command.new(ARGV) cmd.run