A splash of idiomaticity with a side of vi

This commit is contained in:
Conrad Irwin 2011-12-27 22:59:08 +00:00
parent d2d501f386
commit 1e0c7cfe2b
1 changed files with 2 additions and 7 deletions

View File

@ -198,13 +198,8 @@ class Pry
if Helpers::BaseHelpers.windows? if Helpers::BaseHelpers.windows?
'notepad' 'notepad'
else else
case true %w(editor nano vi).detect do |editor|
when system('which editor > /dev/null 2>&1') system("which #{editor} > /dev/null 2>&1")
'editor'
when system('which nano > /dev/null 2>&1')
'nano'
else
nil
end end
end end
end end