Permalink
Browse files

Make a common failure explain itself better.

  • Loading branch information...
1 parent c2e58d8 commit e0c9ff5544ad20cce3446cb095baf3c0ffd6640f @rking rking committed with rking@sharpsaw.org Sep 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/pry/command_set.rb
@@ -219,7 +219,8 @@ def find_command_by_match_or_listing(match_or_listing)
# @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}`",

0 comments on commit e0c9ff5

Please sign in to comment.