Skip to content

Commit cc3d3eb

Browse files
fresh-editor 0.1.18 (new formula)
A text editor for your terminal: easy, powerful and fast. Written in rust.
1 parent 9c0c6f5 commit cc3d3eb

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Formula/f/fresh-editor.rb

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
class FreshEditor < Formula
2+
desc "Text editor for your terminal: easy, powerful and fast"
3+
homepage "https://sinelaw.github.io/fresh/"
4+
url "https://github.com/sinelaw/fresh/archive/refs/tags/v0.1.18.tar.gz"
5+
sha256 "556a8349a2f3cbd1f6541a98f247ceafe1a1bf7fdb7fc4c0364f1982d99eb20e"
6+
license "GPL-2.0-or-later"
7+
8+
depends_on "rust" => :build
9+
10+
def install
11+
system "cargo", "install", *std_cargo_args(path: ".")
12+
end
13+
14+
test do
15+
# Test script mode: type text, save, and quit
16+
commands = <<~JSON
17+
{"type":"type_text","text":"Hello from Homebrew"}
18+
{"type":"key","code":"s","modifiers":["ctrl"]}
19+
{"type":"quit"}
20+
JSON
21+
22+
pipe_output("#{bin}/fresh --script-mode --no-session test.txt", commands)
23+
assert_match "Hello from Homebrew", (testpath/"test.txt").read
24+
end
25+
end

0 commit comments

Comments
 (0)