New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pry-Coolline causes display to flash #5
Comments
Sure @dwbutler . Thank you for the feedback. I've made a fork to update some dependencies but i'm fearful i don't have enough knowledge and time to fix those issues. |
I appreciate that you take the time to maintain this! I have no idea how to fix Pry-Coolline either. =) It appears to be replacing the entire line instead of just replacing the characters that changed color. Hopefully I'll find some time to submit a PR soon. |
@dwbutler Awesome. |
@dwbutler Did you have the chance to take a deeper look at this issue? |
Sorry, I have not. I am using ohmyzsh on a Mac. Maybe I'll launch a vagrant box to test this out on a clean environment. Or try it in bash. |
Append this to your .pryrc # Hack to disable coolline
t = ENV['TERM']
ENV['TERM'] = 'dumb'
begin
require 'pry-coolline'
rescue LoadError
end
ENV['TERM'] = t |
@plribeiro3000 Thanks for your work on making coolline configurable! I just tried it out, and unfortunately it didn't work for me. I'm on a Rails 4.1 app using Bundler. Somehow, (and I can't figure out how), I ended up adding the following to an initializer to fix this: Pry.input = Readline Perhaps Jazz Fingers could do something similar? |
Have you create an initializer to require If is is the case then i have to remove |
@plribeiro3000 Yes, I used the example from the readme. Removing Now I'm wondering how the original Jazz Hands got this to work... |
Hmm. Interesting. I will try your approach. It seems good. =) |
@dwbutler Could you try the latest master? I believe that issue is related to bundler automatically loading |
I tested this using the master branch, from what I can tell, this means I have to manually add all the pry-dependencies myself to my Gemfile? Because now, this gem doesn't depend on anything anymore. +GIT
+ remote: git://github.com/plribeiro3000/jazz_fingers.git
+ revision: f5ed02c0799c9994b2128a23751868c146df2c37
+ specs:
+ jazz_fingers (2.0.0)
+
- jazz_fingers (2.0.0)
- awesome_print (~> 1.6)
- hirb (~> 0.7)
- pry (~> 0.10)
- pry-byebug (~> 3.1)
- pry-coolline (~> 0.2)
- pry-doc (~> 0.6)
- pry-git (~> 0.2)
- pry-remote (>= 0.1.7) |
I saw that, but once I added Btw, I'm no gem developer, so I don't have much insight, but according to the ruby gems website:
And, from an article from 2010 by Yehuda Katz (so this might not be accurate anymore):
|
This is in a fresh rails app, adding only these two lines to the group :development, :test do
gem 'jazz_fingers', github: 'plribeiro3000/jazz_fingers'
gem 'pry-rails'
end diff --git a/Gemfile b/Gemfile
index f7a0b56..02a660e 100644
--- a/Gemfile
+++ b/Gemfile
@@ -41,5 +41,8 @@ group :development, :test do
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring'
-end
+ gem 'jazz_fingers', github: 'plribeiro3000/jazz_fingers'
+ gem 'pry-rails'
+end
diff --git a/Gemfile.lock b/Gemfile.lock
index 42d22ef..8d04f59 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -1,3 +1,9 @@
+GIT
+ remote: git://github.com/plribeiro3000/jazz_fingers.git
+ revision: f5ed02c0799c9994b2128a23751868c146df2c37
+ specs:
+ jazz_fingers (2.0.0)
+
GEM
remote: https://rubygems.org/
specs:
@@ -42,6 +48,7 @@ GEM
builder (3.2.2)
byebug (5.0.0)
columnize (= 0.9.0)
+ coderay (1.1.0)
coffee-rails (4.1.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
@@ -68,12 +75,19 @@ GEM
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
+ method_source (0.8.2)
mime-types (2.6.1)
mini_portile (0.6.2)
minitest (5.7.0)
multi_json (1.11.1)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
+ pry (0.10.1)
+ coderay (~> 1.1.0)
+ method_source (~> 0.8.1)
+ slop (~> 3.4)
+ pry-rails (0.3.4)
+ pry (>= 0.9.10)
rack (1.6.2)
rack-test (0.6.3)
rack (>= 1.0)
@@ -113,6 +127,7 @@ GEM
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
rdoc (~> 4.0)
+ slop (3.6.0)
spring (1.3.6)
sprockets (3.2.0)
rack (~> 1.0)
@@ -143,8 +158,10 @@ PLATFORMS
DEPENDENCIES
byebug
coffee-rails (~> 4.1.0)
+ jazz_fingers!
jbuilder (~> 2.0)
jquery-rails
+ pry-rails
rails (= 4.2.2)
sass-rails (~> 5.0)
sdoc (~> 0.4.0) which of course results in errors like this one: $ rails console
/usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/jazz_fingers-f5ed02c0799c/lib/jazz_fingers.rb:1:in `require': cannot load such file -- hirb (LoadError)
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/bundler/gems/jazz_fingers-f5ed02c0799c/lib/jazz_fingers.rb:1:in `<top (required)>'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:76:in `require'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:72:in `each'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:72:in `block in require'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:61:in `each'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler/runtime.rb:61:in `require'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/bundler-1.10.4/lib/bundler.rb:134:in `require'
from /private/tmp/jazz_fingers_test/config/application.rb:7:in `<top (required)>'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:82:in `require'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:82:in `preload'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:143:in `serve'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:131:in `block in run'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `loop'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application.rb:125:in `run'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/gems/2.2.0/gems/spring-1.3.6/lib/spring/application/boot.rb:18:in `<top (required)>'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /usr/local/opt/rbenv/versions/2.2.2/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from -e:1:in `<main>' |
Hmmm. interesting. That was not what i was expecting since the |
Seems to work for me, thanks! |
Awesome. Thanks for the feedback! |
@aried3r Worked for me too. Thanks |
Syntax highlighting as you type is a cool idea. However, on my machine the whole line "flashes" every time I type a new character. What I mean is that all of the text momentarily disappears, and then reappears again, every time my finger hits a key. It's pretty maddening.
I have no idea if it's just me - I couldn't find any relevant tickets in the Pry-Coolline issue tracker. I have no idea how to fix it myself.
In lieu of a fix, it would be nice if Pry-Coolline could simply be turned off via configuration. I checked the original Jazz Hands, and back then it was possible to disable Pry-Coolline. It looks like this was removed in Jazz Fingers. I can submit a pull request to add this functionality back in.
The text was updated successfully, but these errors were encountered: