Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
3 Commits
 
 
 
 

Repository files navigation

Bashr: bash in irb

As part of bootstrapping myself into ruby, I came up with some changes to .irbrc that make it possible to send args to a bash command.

It was a mind-bending thing to think of a commandline app that was capable of receiving args in an object-oriented kind of way. But for me, it was a step forward into ruby land.

Examples: >> cd ENV["HOME"] => nil >> pwd => "/home/sumsionjg" >> ls "-Al bashr" total 20 drwxr-xr-x 7 sumsionjg sumsionjg 4096 2010-05-21 07:17 .git -rw-r--r-- 1 sumsionjg sumsionjg 661 2010-05-21 07:17 .irbrc => true

Weaknesses:

  • no commands with '-' or '.' can be executed
  • after a while, it's fairly annoying to try to craft command lines, however this annoyance drives me in a good way toward gems, so it's ok

Related ideas:

About

bash from irb

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Morty Proxy This is a proxified and sanitized view of the page, visit original site.