<commit_before>h1. Rubish

Rubish is a shell in Ruby. It is *object oriented*, and it only uses Ruby's own syntax (*no metasyntax* of its own). Rubish is pronounced Roobish, as opposed to Rubbish, unlike Bash.

h2. From Gem

Install:

  $ gem install hayeah-rubish --source http://gems.github.com

Fire up an irb, and start Rubish

  $ irb -rrubish
  irb> Rubish.repl
  rbh> date
  Tue Mar 17 17:06:04 PDT 2009
  rbh> uname :svrm
  Linux 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686

h2. From Source

Install:

  $ git clone git://github.com/hayeah/rubish.git
  $ ./bin/rubish
  rbh>

h2. Getting Started

A few tips upfront. Sometimes Rubish could mess up your terminal. If that happens, try hitting C-c and C-d to get back to Bash, then,

  $ reset

to reset your terminal. Also, Rubish doesn't have shell history. But it uses the readline library, so you can use its history mechanism. C-r <string> to match a previously entered line with string.

If you make changes to Rubish, you hit C-c to go back to irb, and,

<pre><code>
  irb> Rubish.reload
</code></pre>

h2. Command

Rubish REPL takes a line and @instance_eval@ s it with the shell session object. If the method is undefined, they call is translated into a Executable object with @method_missing@.

<pre><code>
rbh> ls
awk.rb	command_builder.rb  command.rb executable.rb  LICENSE	pipe.rb  README.textile rubish.rb  sed.rb  session.rb	streamer.rb<commit_msg>README format fixes<commit_after>h1. Rubish

Rubish is a shell in Ruby. It is *object oriented*, and it only uses Ruby's own syntax (*no metasyntax* of its own). Rubish is pronounced Roobish, as opposed to Rubbish, unlike Bash.

h2. From Gem

Install:

<pre><code>
  $ gem install hayeah-rubish --source http://gems.github.com
</code></pre>

Fire up an irb, and start Rubish

<pre><code>
  $ irb -rrubish
  irb> Rubish.repl
  rbh> date
  Tue Mar 17 17:06:04 PDT 2009
  rbh> uname :svrm
  Linux 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686
</code></pre>

h2. From Source

Install:

<pre><code>
  $ git clone git://github.com/hayeah/rubish.git
  $ ./bin/rubish
  rbh>
</code></pre>

h2. Getting Started

A few tips upfront. Sometimes Rubish could mess up your terminal. If that happens, try hitting C-c and C-d to get back to Bash, then,

  $ reset

to reset your terminal. Also, Rubish doesn't have shell history. But it uses the readline library, so you can use its history mechanism. C-r <string> to match a previously entered line with string.

If you make changes to Rubish, you hit C-c to go back to irb, and,

<pre><code>
  irb> Rubish.reload
</code></pre>

h2. Command

Rubish REPL takes a line and @instance_eval@ s it with the shell session object. If the method is undefined, they call is translated into a Executable object with @method_missing@.

<pre><code>
rbh> ls
awk.rb	command_builder.rb  command.rb executable.rb  LICENSE	pipe.rb  README.textile rubish.rb  sed.rb  session.rb	streamer.rb
{'fraction_non_alphanumeric': 0.09010840108401084, 'fraction_numerical': 0.026422764227642278, 'mean_word_length': 3.5500770416024654, 'pattern_counts': {'":': 0, '<': 29, '<?xml version=': 0, '>': 41, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1945712', 'n_tokens_mistral': 1081, 'n_tokens_neox': 996, 'n_words': 429}