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:
parent
d2d501f386
commit
1e0c7cfe2b
1 changed files with 2 additions and 7 deletions
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue