diff --git a/lib/pry/helpers/command_helpers.rb b/lib/pry/helpers/command_helpers.rb index 87fd35b8..2921e77c 100644 --- a/lib/pry/helpers/command_helpers.rb +++ b/lib/pry/helpers/command_helpers.rb @@ -155,7 +155,7 @@ class Pry # we can just use the program's name and ignore any absolute paths. # def editor_name - Pry.config.editor.split("/").last.split(" ").first + Pry.config.editor.split(%r{[\\/]}).last.split(" ").first end # Remove any common leading whitespace from every line in `text`.