Kyrylo Silin
4cc13f9a40
rubocop: fix offences of the Layout/ExtraSpacing cop
2018-10-13 00:54:00 +08:00
r-obert
7c1a652c6b
Deprecate Pry::Command#text. Please use black(), white(), etc directly ( #1701 )
...
instead (as you would with helper functions from BaseHelpers and
CommandHelpers)
2017-11-16 17:54:14 +01:00
egwspiti
c591031077
display an error message when cat is invoked without arguments.
2015-09-03 13:18:48 +03:00
Kyrylo Silin
6dc80079c9
file_formatter: call #around on Pry::Code instead of String
...
Fixes #1349 (Bug in `cat` since 0.10.1)
2015-02-26 09:04:42 +02:00
Matijs van Zuijlen
3376e6a0db
Fix more warnings
2015-01-23 14:03:50 +01:00
Kyrylo Silin
c6f8d5c632
Revert "Get rid of Code#highlighted"
...
This reverts commit 5599b0a976
.
And fixes jruby-head.
https://travis-ci.org/pry/pry/jobs/30420112
2014-07-20 17:32:17 -07:00
Steven Harman
7c47e0eb0f
Cleanup unused local var warning
...
We're not using the `ext` local variable, so just ignore it by taking
the first element from the split - the filename.
2014-06-24 16:16:58 -04:00
Conrad Irwin
5599b0a976
Get rid of Code#highlighted
2014-05-09 20:16:02 -07:00
Conrad Irwin
5591367c26
Fix highlighting of cat command [ Fix #1225 ]
2014-05-09 20:04:45 -07:00
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