Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- pry(main)> show-command ".<shell command>"
- From: /Users/john/ruby/projects/pry/lib/pry/default_commands/shell.rb @ line 6:
- Number of lines: 15
- command(/\.(.*)/, "All text following a '.' is forwarded to the shell.", :listing => ".<shell command>", :use_prefix => false) do |cmd|
- if cmd =~ /^cd\s+(.+)/i
- dest = $1
- begin
- Dir.chdir File.expand_path(dest)
- rescue Errno::ENOENT
- output.puts "No such directory: #{dest}"
- end
- else
- if !system(cmd)
- output.puts "Error: there was a problem executing system command: #{cmd}"
- end
- end
- end
- pry(main)>
Add Comment
Please, Sign In to add comment