Skip to content

Commit 285c138

Browse files
committed
Add tab completion for rename_job
1 parent 500b622 commit 285c138

File tree

1 file changed

+12
-0
lines changed
  • lib/msf/ui/console/command_dispatcher

1 file changed

+12
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,18 @@ def cmd_rename_job(*args)
813813
true
814814
end
815815

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
827+
816828
def cmd_jobs_help
817829
print_line "Usage: jobs [options]"
818830
print_line

0 commit comments

Comments
 (0)