Baike.dev
All toolsTrendingOpen sourceNewsSubmit
Log in
< 返回工具列表
A

act

> 编程语言
开源

Act Preview files from the command line efficiently. cat for the twenty first century! Features - Flexible input handling - Support for col…

71.9K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

Act Preview files from the command line efficiently. cat for the twenty first century! Features - Flexible input handling - Support for col…

Act

Preview files from the command line efficiently. cat for the twenty first century!

Features

  • Flexible input handling
    • Support for colon syntax
    • Support for GitHub like URLs
  • Automatic syntax highlighting based on the file extension (via Pygments)
  • Fast enough for the task

Installation

$ [sudo] gem install act
$ [sudo] easy_install Pygments #optional

Help needed

Follow @fabiopelosin to help me beat @orta in followers count.

Usage

Print a complete file:

$ act lib/act/command.rb

0    require 'colored'
1    require 'claide'
2    require 'active_support/core_ext/string/strip'
[...]

Print the line 10 with the default context (5 lines):

$ act lib/act/command.rb:10

5    module Act
6      class Command < CLAide::Command
7
8        self.command = 'act'
9        self.description = 'Act the command line tool to act on files'
10
11       def self.options
12         [
13           ['--open', "Open the file in $EDITOR instead of printing it"],
14           ['--no-line-numbers', "Show output without line numbers"],
15           ['--version', 'Show the version of Act'],

Open in $EDITOR the file at the given line:

$ act lib/act/command.rb:10 --open

Print from line 8 to line 12:

$ act lib/act/command.rb:8-12

8    self.command = 'act'
9    self.description = 'Act the command line tool to act on files'
10
11   def self.options
12     [

Print from line 10 with 2 lines of context:

$ act lib/act/command.rb:10+2

8    self.command = 'act'
9    self.description = 'Act the command line tool to act on files'
10
11   def self.options
12     [

Show ./lib/act/command.rb from line 8 to line 9:

$ act https://github.com/irrationalfab/act/blob/master/lib/act/command.rb\#L8-L9

8    self.command = 'act'
9    self.description = 'Act the command line tool to act on files'

Open $EDITOR ./lib/act/command.rb at line 8:

$ act https://github.com/irrationalfab/act/blob/master/lib/act/command.rb\#L8-L9

核心特点

  • •Flexible input handling
  • •Support for colon syntax
  • •Support for GitHub like URLs
  • •Automatic syntax highlighting based on the file extension (via Pygments)
  • •Fast enough for the task

> 标签

Ruby

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

> 工具信息

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

> 相关工具

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

baike.dev helps you discover great languages, frameworks, databases, DevOps and cloud-native tools.

Quick links

  • Home
  • All tools
  • Trending
  • Open source

About

  • About us
  • Community
  • News

Contribute

Found a great developer tool? Share it with the community.

Submit a tool
© 2026 baike.dev Developer EncyclopediaUpdated daily · Discover great developer tools