class Pry::Command::ShellCommand
Public Instance Methods
complete(search)
click to toggle source
Calls superclass method
Pry::Command#complete
# File lib/pry/commands/shell_command.rb, line 37 def complete(search) super + Bond::Rc.files(search.split(" ").last || '') end
process(cmd)
click to toggle source
# File lib/pry/commands/shell_command.rb, line 18 def process(cmd) if cmd =~ /^cd\s+(.+)/i dest = $1 begin Dir.chdir File.expand_path(dest) rescue Errno::ENOENT raise CommandError, "No such directory: #{dest}" end else pass_block(cmd) if command_block command_block.call %x#{cmd}` else Pry.config.system.call(output, cmd, _pry_) end end end