Problem: I cannot paste multi-line code as pry tries to execute every line.
Expected behavior:
[1] pry(main)> %w[a b c]
.map(&:to_sym)
=> [:a, :b, :c]
[2] pry(main)>
Actual behavior:
[1] pry(main)> %w[a b c]
=> ["a", "b", "c"]
[2] pry(main)> .map(&:to_sym)
sh: -c: line 0: syntax error near unexpected token `&'
sh: -c: line 0: `map(&:to_sym)'
Error: there was a problem executing system command: map(&:to_sym)
[3] pry(main)>
Code is just a short example to explain the problem. This problem occurs when I copy some other multiline code snippet from a code editor to a console.
Please, do not suggest using EnforcedStyle: trailing rubocop rule and rewrite the project. I prefer to use EnforcedStyle: leading (default)
Environment:
iTerm2 Build 3.5.2- I'm not sure if it's connected with iTerm2, as in the standardTerminalapp for a macbook it behaves the same.asdfversion manager.rails 7.0.2.3- I'm not sure if it's connected with Rails. I tried just globally installedprygem and it behaves the same.pry 0.14.1- I don't use any file with specific configuration.pry-rails 0.3.9- I'm not sure if it's connected with pry-rails. I tried just globally installedprygem and it behaves the same.
I asked ChatGPT and googled about the problem and tested all I found. Nothing helped.
The most interesting part is that I'm in progress of migration from my previous macbook air m1 to my new macbook pro m2. I didn't use Migration Assistant app for that. The Air was my first apple computer and I was studying using their OS. I wanted to configure the new computer and setup the project there manually from the ground up. So the Expected behavior works on Air, and doesn't work on Pro. I compared ~/.zshrc and the only one difference there related to the way I installed asdf. "What could be easier when you have a properly configured machine to just copy the settings you need?" thought I. Okay, not so easy...
readlineversion / configuration? How did you install Ruby?