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?
|
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 New Issue