1
0
Fork 0
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:
☈king 2012-09-13 02:14:47 -06:00 committed by rking@sharpsaw.org
parent c2e58d8e9a
commit e0c9ff5544

View file

@ -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}`",