File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed
lib/msf/ui/console/command_dispatcher Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def commands
107
107
"connect" => "Communicate with a host" ,
108
108
"color" => "Toggle color" ,
109
109
"exit" => "Exit the console" ,
110
- "edit" => "Edit the current module with $EDITOR" ,
110
+ "edit" => "Edit the current module with $VISUAL or $ EDITOR" ,
111
111
"go_pro" => "Launch Metasploit web GUI" ,
112
112
"grep" => "Grep the output of another command" ,
113
113
"help" => "Help menu" ,
@@ -634,7 +634,7 @@ def local_editor
634
634
635
635
def cmd_edit_help
636
636
msg = "Edit the currently active module"
637
- msg = "#{ msg } #{ local_editor ? "with #{ local_editor } " : "($EDITOR must be set first)" } ."
637
+ msg = "#{ msg } #{ local_editor ? "with #{ local_editor } " : "($VISUAL or $ EDITOR must be set first)" } ."
638
638
print_line "Usage: edit"
639
639
print_line
640
640
print_line msg
@@ -647,11 +647,7 @@ def cmd_edit_help
647
647
#
648
648
def cmd_edit
649
649
unless local_editor
650
- print_error "$EDITOR must be set first. Try 'export EDITOR=/usr/bin/vim'"
651
- return
652
- end
653
- unless ::File . executable_real? local_editor
654
- print_error "#{ local_editor } doesn't seem to be executable by you."
650
+ print_error "$VISUAL or $EDITOR must be set first. Try 'export EDITOR=/usr/bin/vim'"
655
651
return
656
652
end
657
653
if active_module
You can’t perform that action at this time.
0 commit comments