百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

fir

> 编程语言
开源

fir 的全称是 friendly-interactive-ruby!

270 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

fir 的全称是 friendly-interactive-ruby!

Description

Fir is a ruby repl that is an alternative to IRB. Fir aims to bring some of the friendly features that the fish project brought to shells to a ruby repl.

Fir does bring some features to the table that pry and other REPL's do not have. The key difference between pry, IRB, Ripl, etc, and Fir is that Fir puts stdin into raw mode which allows us to provide features like autosuggestion a la fish, and automatically indenting/dedenting code as you type. Below is a gif of Fir in action:

As the video demonstrates, Fir is able to indent your code as soon as it is typed, not just when you hit enter. It also can suggest lines from your history file as you type as well!

Install

gem install fir-repl

Note Fir requires Ruby 2.3.0 or greater.

Usage

$ fir
(fir)> ...

Key Commands

Fir aims to bring familiar bash keyboard shortcuts that we all know and love, however many editing commands remain unimplemented. Below is a list of keycommands, what they do, and whether they are implemented.

Command Alt Description Status
Ctrl + a N/A Move cursor to the beginning of the line Implemented
Ctrl + e N/A Move cursor to the end of the line Implemented
Ctrl + c N/A Clear current state, and step out of the block. Implemented
Ctrl + d N/A Exit program. Implemented
Ctrl + v N/A Paste from system clipboard. Implemented
Ctrl + z N/A Put the running Fir process in the background. Implemented
Ctrl + p Up Arrow Previous command in history (i.e. walk back through the command history). Implemented
Ctrl + n Down Arrow Next command in history (i.e. walk forward through the command history). Implemented
Ctrl + b Left Arrow Backward one character. Implemented
Ctrl + f Right Arrow Forward one character. Implemented
Ctrl + u N/A Cut the line before the cursor position Implemented
Ctrl + d N/A Delete character under the cursor Not implemented
Ctrl + h N/A Delete character before the cursor (backspace) Not implemented
Ctrl + w N/A Cut the Word before the cursor to the clipboard Not implemented
Ctrl + k N/A Cut the Line after the cursor to the clipboard Not implemented
Ctrl + t N/A Swap the last two characters before the cursor (typo) Not implemented
Ctrl + y N/A Paste the last thing to be cut (yank) Not implemented
Сtrl + _ N/A Undo Not implemented

Future Ideas

Below is a list of ideas/features that I would like to eventually add.

  • Break points a la binding.pry
  • Configurability via .firrc file
  • Command line options
    • -r: load module (same as ruby -r)
    • -e, --exec: A line of code to execute in context before the session starts
    • --no-history: Disable history loading
    • --no-prompt: Disable prompt
  • Suggesting methods, local variables, instance variables, and global variables that are in scope as you type
  • Colorization

Issues· 4 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Ruby

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言