# File lib/commander/user_interaction.rb, line 239 def available_editor(preferred = nil) [preferred, ENV['EDITOR'], 'mate -w', 'vim', 'vi', 'emacs', 'nano', 'pico'] .compact .find { |name| system("hash #{name.split.first} 2>&-") } end