A splash of idiomaticity with a side of vi
This commit is contained in:
parent
d2d501f386
commit
1e0c7cfe2b
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue