Skip to content

Commit 8c864ef

Browse files
author
kernelsmith
committed
msftidy fixes and updated a comment
1 parent b1c70f8 commit 8c864ef

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

plugins/alias.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def cmd_alias(*args)
4545
# we parse args manually instead of using @@alias.opts.parse to handle special cases
4646
case args.length
4747
when 0 # print the list of current aliases
48-
if @aliases.length == 0
48+
if @aliases.length == 0
4949
return print_status("No aliases currently defined")
5050
else
5151
tbl = Rex::Ui::Text::Table.new(
@@ -86,7 +86,7 @@ def cmd_alias(*args)
8686
# for example you 'alias -f set unset and then 'alias -f alias sessions', now you're screwed. The byproduct
8787
# of this is that it prevents you from aliasing 'alias' to 'alias -f' etc, but that's acceptable
8888
reserved_words = [/^alias/i]
89-
reserved_words.each do |regex|
89+
reserved_words.each do |regex|
9090
if name =~ regex
9191
print_error "You cannot use #{name} as the name for an alias, sorry"
9292
return false
@@ -150,7 +150,7 @@ def cmd_alias(*args)
150150
def cmd_alias_help
151151
print_line "Usage: alias [options] [name [value]]"
152152
print_line
153-
print(@@alias_opts.usage())
153+
print(@@alias_opts.usage())
154154
end
155155

156156
#
@@ -204,7 +204,7 @@ def register_alias(name, value)
204204
driver.run_single("help #{value}")
205205
end
206206
end
207-
# add the alias to the list
207+
# add the alias to the list
208208
@aliases[name] = value
209209
end
210210

@@ -213,7 +213,7 @@ def register_alias(name, value)
213213
#
214214
def deregister_alias(name)
215215
self.class_eval do
216-
# remove the class methods we created when the alias was registered
216+
# remove the class methods we created when the alias was registered
217217
remove_method("cmd_#{name}")
218218
remove_method("cmd_#{name}_tabs")
219219
remove_method("cmd_#{name}_help")
@@ -223,7 +223,7 @@ def deregister_alias(name)
223223
end
224224

225225
#
226-
# Validate a proposed alias
226+
# Validate a proposed alias with the +name+ and having the value +value+
227227
#
228228
def is_valid_alias?(name,value)
229229
#print_good "Assessing validay for #{name} and #{value}"
@@ -343,4 +343,4 @@ def desc
343343
end
344344

345345
end ## End Plugin Class
346-
end ## End Module
346+
end ## End Module

0 commit comments

Comments
 (0)