man/ripl.1.html in ripl-0.2.9 vs man/ripl.1.html in ripl-0.3.0
- old
+ new
@@ -78,11 +78,11 @@
<code>ripl</code> - <span class="man-whatis">Ruby Interactive Print Loop - A light, modular alternative to irb</span>
</p>
<h2 id="SYNOPSIS">SYNOPSIS</h2>
-<pre><code>ripl [COMMAND] [-r|--require] [-I] [-f] [-d] [-h|--help] [-v|--version] [ARGS]
+<pre><code>ripl [COMMAND] [ARGS] [-r|--require] [-I] [-f] [-d] [-h|--help] [-v|--version]
</code></pre>
<h2 id="DESCRIPTION">DESCRIPTION</h2>
<p>ripl is a light, modular alternative to irb. Like irb, it loads ~/.irbrc, has autocompletion and
@@ -179,11 +179,12 @@
for you and anyone else who uses your plugin!</p></li>
<li><p>Plugins can setup and teardown anything around a shell by extending Shell#before_loop and Shell#after_loop:</p>
<p> module Ripl::MyPlugin</p>
-<pre><code>def before_loop
+<pre><code># When requiring a plugin within ripl, this callback isn't called
+def before_loop
super
# Open file, open connection ...
end
def after_loop
@@ -219,10 +220,12 @@
The syntax of this file is explained <a href="http://tagaholic.me/bond/doc/Bond/Rc.html">in bond's docs</a>.
To autocomplete a console command, define a :method completion. For an example plugin that uses this, see
<a href="http://github.com/cldwalker/ripl-commands">ripl-commands</a>.</p></li>
<li><p>For plugins with console commands, commands aren't immediately recognized if the plugin is required within ripl.
To fix this: Ripl.shell.add_commands(self).</p></li>
+<li><p>A plugin should not have Ripl.shell in the top-level i.e. touch Ripl.shell when it's required. Doing
+this can make commandline options buggy.</p></li>
<li><p>For more examples of plugins, see gems I've made that start with 'ripl-'.</p></li>
</ul>
<h2 id="CREATE-CUSTOM-SHELLS">CREATE CUSTOM SHELLS</h2>
@@ -255,13 +258,16 @@
# Load rails console with debugger
$ ripl rails -rrdebug
</code></pre>
<p>To create a ripl command, create an executable in the format ripl-command and make sure it's in your
-shell's $PATH. For example, the file 'ripl-my_gem' would be invoked with 'ripl my_gem'. Any
-arguments to a ripl command can be parsed as the ripl command pleases i.e. into options and
-arguments. For an example command, see <a href="http://github.com/cldwalker/ripl-rails">ripl-rails</a>.</p>
+shell's $PATH. For example, the file 'ripl-my_gem' would be invoked with 'ripl my_gem'. A ripl
+command can take arguments, local options and global options (i.e. -f). To avoid conflicts between
+local and global options, local options <em>must be parsed and deleted</em> by the command before
+Ripl.start is invoked. For example commands, see
+<a href="http://github.com/cldwalker/ripl-rails">ripl-rails</a> and
+<a href="http://github.com/cldwalker/ripl-play">ripl-play</a>.</p>
<h2 id="BUGS">BUGS</h2>
<p>Please report bugs at <a href="http://github.com/cldwalker/ripl/issues" data-bare-link="true">http://github.com/cldwalker/ripl/issues</a>.</p>
@@ -275,10 +281,10 @@
<a href="http://github.com/cldwalker/ripl-irb" data-bare-link="true">http://github.com/cldwalker/ripl-irb</a>, <a href="http://github.com/cldwalker/ripl-rails" data-bare-link="true">http://github.com/cldwalker/ripl-rails</a>, <a href="http://github.com/janlelis/multi_line" data-bare-link="true">http://github.com/janlelis/multi_line</a></p>
<ol class='man-decor man-foot man foot'>
<li class='tl'>CLDWALKER</li>
- <li class='tc'>December 2010</li>
+ <li class='tc'>January 2011</li>
<li class='tr'>ripl(1)</li>
</ol>
</div>
</body>