Skip to content

Commit 9cbb8c2

Browse files
committed
Merge pull request #27 from wvu-r7/pr/4810
Add tab completion for rename_job
2 parents e9b6a02 + 285c138 commit 9cbb8c2

File tree

1 file changed

+11
-1
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+11
-1
lines changed

lib/msf/ui/console/command_dispatcher/core.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,6 @@ def cmd_irb(*args)
781781
end
782782
end
783783

784-
785784
def cmd_rename_job_help
786785
print_line "Usage: rename_job [ID] [Name]"
787786
print_line
@@ -814,6 +813,17 @@ def cmd_rename_job(*args)
814813
true
815814
end
816815

816+
#
817+
# Tab completion for the rename_job command
818+
#
819+
# @param str [String] the string currently being typed before tab was hit
820+
# @param words [Array<String>] the previously completed words on the command line. words is always
821+
# at least 1 when tab completion has reached this stage since the command itself has been completed
822+
823+
def cmd_rename_job_tabs(str, words)
824+
return [] if words.length > 1
825+
framework.jobs.keys
826+
end
817827

818828
def cmd_jobs_help
819829
print_line "Usage: jobs [options]"

0 commit comments

Comments
 (0)