1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00

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

View file

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