1
0
Fork 0
mirror of https://github.com/pry/pry.git synced 2022-11-09 12:35:05 -05:00
Commit graph

6 commits

Author SHA1 Message Date
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
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