Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fallback to $VISUAL if no $EDITOR is found

  • Loading branch information...
commit 6a5625ff567b5b98a7456c4654173e32a94380d6 1 parent bb3b869
@oscardelben authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/sheet.rb
View
6 lib/sheet.rb
@@ -50,7 +50,11 @@ def sheet_exists?(name)
# @return [String]
# Used to check the preferred editor for the user
def editor
- exec("echo $EDITOR").chomp
+ e = exec("echo $EDITOR").chomp
+ if e == ""
+ e = exec("echo $VISUAL").chomp
+ end
+ e
end
# If we're using mac, we should use open to open urls.
Please sign in to comment.
Something went wrong with that request. Please try again.