Skip to content

tony612/tryrb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

75 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Tryrb Gem

Gem Version Dependency Status Build Status Coverage Status Code Climate Bitdeli Badge

Try ruby in a fascinating way

Create and execute a temp file by one command.

Installation

$ gem install tryrb

Why creating this?

Maybe you often try ruby scripts like this:

$ cd ~/tmp
$ vim foooooooo.rb
$ ruby foooooooo.rb

You have to change working directory, figure out a name, finally try to find the right file to run.It's bothering! 💢

But this gem provide an easy way to do this. 💛

Usage

The simplest and fastest way:
$ tryrb c/create
# Editing ruby code
$ tryrb e/exec

A file named, for exmaple, 201401010909.rb will be created and executed.

More options:

Create a temp file

Specify a name

$ tryrb c/create foo

A file named, for exmaple, 201401010909_foo.rb will be created.

Execute a ruby script

Last one file in your temp dir

$ tryrb e/exec

The last one file containing foo

$ tryrb e/exec foo

Nth from the bottom file

$ tryrb e/exec -l n

Nth from the bottom file containing name foo

$ tryrb e/exec -l n foo

Open a ruby script to edit

(It's same with exec usage)

$ tryrb o/open

Config

tryrb config

A configure file ~/.tryrbrc will be created.

Alias

c is alias of create, e is alias of exec and o is alias of open.

Get help

$ tryrb help COMMAND

Contributing

Welcome contributing by forking, sending pull requests or opening issues.

Copyright

Copyright (c) 2014 Tony Han. See LICENSE for details.

About

Try a ruby script in a fascinating way

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages