mirror of
https://github.com/pry/pry.git
synced 2022-11-09 12:35:05 -05:00
Make a common failure explain itself better.
This commit is contained in:
parent
c2e58d8e9a
commit
e0c9ff5544
1 changed files with 2 additions and 1 deletions
|
@ -219,7 +219,8 @@ class Pry
|
|||
# @example Pass explicit description (overriding default).
|
||||
# Pry.config.commands.alias_command "lM", "ls -M", :desc => "cutiepie"
|
||||
def alias_command(match, action, options={})
|
||||
original_options = find_command(action).options.dup
|
||||
cmd = find_command(action) or fail "Command: `#{action}` not found"
|
||||
original_options = cmd.options.dup
|
||||
|
||||
options = original_options.merge!({
|
||||
:desc => "Alias for `#{action}`",
|
||||
|
|
Loading…
Reference in a new issue