Commit Graph

8 Commits

Author SHA1 Message Date
Robert Gleeson fd9a23eb30 update 'cat' command to use _pry_.config.default_window_size 2014-02-07 02:03:58 +01:00
yui-knk 08702ce1d8 Make file_and_line method to be public (lib/pry/commands/cat/file_formatter.rb) 2013-12-14 21:04:45 +09:00
yui-knk 4b284f9aea Fix some file paths break in Windows (#708). file_and_line methods in lib/pry/commands/cat/file_formatter.rb split file path with ':'. So if file path is 'c:/path/to/file', this method works incorrectly. This fix replace ':' to regexp 2013-12-14 20:29:42 +09:00
Shannon Skipper ea1faa535d Add cat support for Ruby files with .rb ext omitted.
Add support for %cat with .rb ext omitted.

Allow highlighting ommitted '.rb' ext, DRY up ext checking.

Only call Pry::Code#from_file once on instantiation.
2013-11-18 15:15:28 -08:00
Shannon Skipper abfda989be Also files relative to load path dirs.
Oops, fix typo in comments.

Switch to  backticks instead of plusses.

Set and unset  in a context.

Remove unnecessary #basename.

Remove early File#basename so relative paths actually work.
2013-11-13 21:54:10 -08:00
Conrad Irwin 71b364e97c Move all hacking of rbx paths into Pry::Code 2013-05-10 00:49:36 -07:00
John Mair 86206767f0 Pry::Command::Cat::FileFormatter: make format() private 2013-01-09 01:42:08 +01:00
John Mair 92fe82dbd6 refactor cat command
Put each output formatter (input expression, exception, file) into its own class.
2013-01-06 21:44:33 +01:00