Auto formatting should be disabled by default

未关闭
#457 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
45/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
ruby
领域
cli

调研方向

首先,使用报告中的 ~/.irbrc 设置并检查 irb_info,在 Ruby 2.7.6 和 IRB 1.5.0 下重现输出。跟踪自动格式化的启用方式,并验证它默认处于禁用状态,同时显式的 pp 输出仍然可用。

由索引模型根据 Issue 内容生成。

描述

Description

After upgrading to ruby 2.7.6 our IRB got broken, copy and pasting a long string was slow, if you need to paste a multiline test in a middle of a string that also didn't work. We had to upgrade the IRB gem to 1.5.0, now it always automatically formats the output, which I don't need.

Now the output looks like this, which is quite annoying. Previously, when I needed a formatted output I was able to use pp. Can't find a way to disable this with Heroku also.

2.7.6 :002 > stats = [[17144, 514], [17638, 522], [16796, 525], [16838, 535], [131, 538], [17080, 542], [15866, 573], [16924, 575], [17594, 605], [943, 611], [17379, 612], [17056, 640], [16795, 681], [17481, 686], [13529, 692], [17286, 697], [17640, 717], [13852, 720], [1726, 749], [14243, 758], [13785, 771], [14342, 779], [13627, 861], [27, 867], [13594, 871], [17285, 940], [17139, 944], [14286, 982], [15796, 995], [14180, 1024], [17583, 1130], [15918, 1207], [15664, 1256], [17066, 1372], [16243, 1373], [17198, 1400], [17213, 1516], [17622, 1539], [17467, 1621], [17122, 1700], [15739, 1752], [16939, 1760], [16940, 1843], [15510, 1929], [17164, 1963], [15667, 2033], [17001, 2633], [17493, 3372], [16325, 3535], [16485, 3763], [17580, 4002], [16480, 4495], [16952, 4604], [17114, 4860], [17046, 5012], [17401, 5123], [17047, 5268], [13653, 5379], [16138, 5391], [17070, 6030], [15255, 6387], [63, 6536], [17476, 6837], [15682, 7263], [16446, 8721], [15867, 9081], [17465, 9207], [17307, 9836], [17414, 10553], [14762, 12058], [17639, 15060], [14932, 19581], [17099, 21540], [17437, 25341], [12985, 31836], [17666, 31848], [17439, 35802], [17668, 178481], [17667, 247517]]
 =>
[[17144, 514],
...
2.7.6 :003 > stats
 =>
[[17144, 514],
 [17638, 522],
 [16796, 525],
 [16838, 535],
 [131, 538],
 [17080, 542],
 [15866, 573],
 [16924, 575],
 [17594, 605],
 [943, 611],
 [17379, 612],
 [17056, 640],
 [16795, 681],
 [17481, 686],
 [13529, 692],
 [17286, 697],
 [17640, 717],
 [13852, 720],
 [1726, 749],
 [14243, 758],
 [13785, 771],
 [14342, 779],
 [13627, 861],
 [27, 867],
 [13594, 871],
 [17285, 940],
 [17139, 944],
 [14286, 982],
 [15796, 995],
 [14180, 1024],
 [17583, 1130],
 [15918, 1207],
 [15664, 1256],
 [17066, 1372],
 [16243, 1373],
 [17198, 1400],
 [17213, 1516],
 [17622, 1539],
 [17467, 1621],
 [17122, 1700],
 [15739, 1752],
 [16939, 1760],
 [16940, 1843],
 [15510, 1929],
 [17164, 1963],
 [15667, 2033],
 [17001, 2633],
 [17493, 3372],
 [16325, 3535],
 [16485, 3763],
 [17580, 4002],
 [16480, 4495],
 [16952, 4604],
 [17114, 4860],
 [17046, 5012],
 [17401, 5123],
 [17047, 5268],
 [13653, 5379],
 [16138, 5391],
 [17070, 6030],
 [15255, 6387],
 [63, 6536],
 [17476, 6837],
 [15682, 7263],
 [16446, 8721],
 [15867, 9081],
 [17465, 9207],
 [17307, 9836],
 [17414, 10553],
 [14762, 12058],
 [17639, 15060],
 [14932, 19581],
 [17099, 21540],
 [17437, 25341],
 [12985, 31836],
 [17666, 31848],
 [17439, 35802],
 [17668, 178481],
 [17667, 247517]]

Result of irb_info

2.7.6 :001 > irb_info
 =>
Ruby version: 2.7.6
IRB version: irb 1.5.0 (2022-11-20)
InputMethod: ReadlineInputMethod with ext/readline 8.2
.irbrc path: /Users/heaven/.rvm/rubies/ruby-2.7.6/.irbrc
RUBY_PLATFORM: arm64-darwin22
East Asian Ambiguous Width: 1

Terminal Emulator

iTerm2

Setting Files

My ~/.irbrc

IRB.conf[:USE_MULTILINE] = false
主要语言
Ruby
星标
477
派生
165
平均合并
1 天 19 小时
30 天内合并 PR
5

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

ruby/irb 的其他 Issue

查看 ruby/irb 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。