fixed alias_command docs
This commit is contained in:
parent
d0cf3ef153
commit
62c63c1619
|
@ -87,9 +87,11 @@ class Pry
|
||||||
# Create an alias for a command.
|
# Create an alias for a command.
|
||||||
# @param [String] new_command The alias name.
|
# @param [String] new_command The alias name.
|
||||||
# @param [String] orig_command The original command name.
|
# @param [String] orig_command The original command name.
|
||||||
|
# @param [String] desc The optional description.
|
||||||
# @example
|
# @example
|
||||||
# class MyCommands < Pry::CommandBase
|
# class MyCommands < Pry::CommandBase
|
||||||
# alias_command "help_alias", "help"
|
# alias_command "help_alias", "help"
|
||||||
|
# end
|
||||||
def alias_command(new_command_name, orig_command_name, desc=nil)
|
def alias_command(new_command_name, orig_command_name, desc=nil)
|
||||||
commands[new_command_name] = commands[orig_command_name].dup
|
commands[new_command_name] = commands[orig_command_name].dup
|
||||||
commands[new_command_name][:description] = desc if desc
|
commands[new_command_name][:description] = desc if desc
|
||||||
|
|
Loading…
Reference in New Issue