Giter Club home page Giter Club logo

act's Introduction

Act

Build Status

Allows to act on 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

act's People

Contributors

bak avatar denisdefreyne avatar fabiopelosin avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.