ruby_jard icon indicating copy to clipboard operation
ruby_jard copied to clipboard

Pager isn't working

Open scottjacobsen opened this issue 5 years ago • 8 comments

When I view a variable in the REPL that doesn't fit on one screen it appears to display the attributes using less, and I have the : prompt at the bottom of the screen. But the less key bindings don't work. I've tried the vim style bindings, emacs style, typed space to page down, and typed q to exit the pager. All the keys are just echoed to the screen but they do not actually do anything. It appears they are simply not passed through to the pager. All I can do is ctl-c to exit jard and start over.

To Reproduce Steps to reproduce the behavior:

  1. Debug a script with a variable with a lot of attributes
  2. View the variable in the REPL
  3. It appears to display the attributes in the pager, but you can't actually move around in the pager.

Expected behavior Standard pager movement should work.

Environment (please complete the following information):

  • OS: MacOS 10.15.6 Catalina
  • ITerm2
  • Output when you run tput colors in your terminal => 256
  • Output when you run echo $TERM in your terminal => xterm-256color
  • Output when you run stty
speed 38400 baud;
lflags: echoe echok echoke echoctl pendin
iflags: -ixon iutf8
oflags: -oxtabs
cflags: cs8 -parenb
  • Do you use tmux/screen or similar tty multiplexer? => No

scottjacobsen avatar Oct 05 '20 18:10 scottjacobsen

@scottjacobsen Could you help me a little bit by running this check on your terminal emulator:

ruby -e '100.times { |index| puts "Line #{index}"}' | less -R -X

Does it works as expected, or the behavior is the same? If it's still broken, could you give me the output of less --version in your terminal emulator?

0x2c7 avatar Oct 06 '20 07:10 0x2c7

Thanks.

Yes, this works.

It is starting to look like it could be a gem conflict. I just made a little test script with no dependencies and Jard is working as expected there as well.

I'll start commenting gems out of my main project and see if I can track it down.

scottjacobsen avatar Oct 06 '20 15:10 scottjacobsen

Ahhh. Glad to hear that. Yes, Ruby Jard will conflict with gems which depend on Pry or Byebug, or gems which override Readline. I discovered some of them. You can check the list in https://rubyjard.org/docs/#conflicts

0x2c7 avatar Oct 06 '20 16:10 0x2c7

Same problem here, awaiting @scottjacobsen before trying again :-)

caifara avatar Oct 12 '20 07:10 caifara

Be warned - there are so many gems in my rails project, I'm not sure when or if I'll get a chance to narrow it down :)

scottjacobsen avatar Oct 13 '20 15:10 scottjacobsen

@scottjacobsen I'm waiting ;-)

(joking of course)

caifara avatar Oct 13 '20 15:10 caifara

@scottjacobsen If your Gemfile is not sensitive, you can post it here. So that I can have a look, and find the troublesome one for you :smile:

0x2c7 avatar Oct 13 '20 15:10 0x2c7

@scottjacobsen do you use spring ?

same problem here when use jard with spring, all the keys just echoed to the screen in the pager

frullah avatar Oct 22 '20 09:10 frullah