From 3203f002183ac615c4cb6b95d17fdbdd5f34af69 Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Tue, 21 Aug 2012 00:44:26 -0700 Subject: [PATCH] filename completion for cat and shell --- lib/pry/commands/cat.rb | 4 ++++ lib/pry/commands/shell_command.rb | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/lib/pry/commands/cat.rb b/lib/pry/commands/cat.rb index d2df7d82..23d4f2c7 100644 --- a/lib/pry/commands/cat.rb +++ b/lib/pry/commands/cat.rb @@ -137,6 +137,10 @@ class Pry code end + def complete(search) + super + Bond::Rc.files(search.split(" ").last || '') + end + def detect_code_type_from_file(file_name) name, ext = File.basename(file_name).split('.', 2) diff --git a/lib/pry/commands/shell_command.rb b/lib/pry/commands/shell_command.rb index b67379f2..7c07859a 100644 --- a/lib/pry/commands/shell_command.rb +++ b/lib/pry/commands/shell_command.rb @@ -23,5 +23,9 @@ class Pry end end end + + def complete(search) + super + Bond::Rc.files(search.split(" ").last || '') + end end end