Updates manual

This commit is contained in:
Rémy Coutable 2011-08-15 09:49:21 +02:00
parent 59bb373fa7
commit 1ee70fbe2e
5 changed files with 159 additions and 195 deletions

View File

@ -1,9 +1,13 @@
guard 'rspec', :version => 2, :keep_failed => false, :cli => '--format Fuubar' do guard :rspec, :version => 2, :keep_failed => false, :cli => '--format Fuubar' do
watch(%r{^spec/.+_spec\.rb$}) watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" } watch(%r{^lib/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" } watch('spec/spec_helper.rb') { "spec" }
end end
guard :ronn do
watch(%r{^man/.+\.ronn?$})
end
# require 'guard/guard' # require 'guard/guard'
# #
# module ::Guard # module ::Guard
@ -17,7 +21,3 @@ end
# group "exceptional" do # group "exceptional" do
# guard :breaking # guard :breaking
# end # end
guard 'ronn' do
watch(%r{^man/.+\.m(ark)?d(own)?$})
end

View File

@ -10,7 +10,7 @@
Guard is a command line tool that easily handle events on files modifications\. Guard is a command line tool that easily handle events on files modifications\.
. .
.SH "SYNOPSIS" .SH "SYNOPSIS"
guard \fIcommand\fR \fIoptions\fR \fBguard <COMMAND> <OPTIONS>\fR
. .
.SH "COMMANDS" .SH "COMMANDS"
. .
@ -21,103 +21,54 @@ Starts Guard\. This is the default command if none is provided\.
The following options are available: The following options are available:
. .
.P .P
\fB\-c\fR/\fB\-\-clear\fR \fB\-c\fR, \fB\-\-clear\fR Clears the Shell after each change\.
.
.IP "" 4
.
.nf
Clears the Shell after each change\.
.
.fi
.
.IP "" 0
. .
.P .P
\fB\-n\fR/\fB\-\-notify\fR \fIflag\fR \fB\-n\fR, \fB\-\-notify\fR \fIFLAG\fR Disable notifications (Growl or Libnotify depending on your system)\. Notifications can be disabled globally by setting a GUARD_NOTIFY environment variable to false\. FLAG can be \fBtrue\fR/\fBfalse\fR or \fBt\fR/\fBf\fR\.
.
.IP "" 4
.
.nf
Disable notifications (Growl or Libnotify depending on your system)\.
Note that notifications can also be disabled globally by setting a GUARD_NOTIFY environment variable to false\.
The <flag> part can be passed to guard using true/false or t/f\.
.
.fi
.
.IP "" 0
. .
.P .P
\fB\-d\fR/\fB\-\-debug\fR \fB\-d\fR, \fB\-\-debug\fR Runs Guard in debug mode\.
.
.IP "" 4
.
.nf
Runs Guard in debug mode\.
.
.fi
.
.IP "" 0
. .
.P .P
\fB\-g\fR/\fB\-\-group\fR \fIgroup\fR \.\.\. \fB\-g\fR, \fB\-\-group\fR \fIGROUP1\fR \fIGROUP2\fR\.\.\. Runs only the groups specified by GROUP1, GROUP2 etc\. Groups name should be separated by spaces\. Guards that don\'t belong to a group are considered global and are always run\.
.
.IP "" 4
.
.nf
Runs only the groups specified\.
.
.fi
.
.IP "" 0
. .
.P .P
\fB\-w\fR/\fB\-\-watchdir\fR \fIfolder\fR \fB\-w\fR, \fB\-\-watchdir\fR \fIPATH\fR
.
.IP "" 4
.
.nf
Specify the directory to watch\.
.
.fi
.
.IP "" 0
. .
.P .P
\fB\-G\fR/\fB\-\-guardfile\fR \fIfile\fR Tells Guard to watch PATH instead of \fB\./\fR\.
. .
.IP "" 4 .P
\fB\-G\fR, \fB\-\-guardfile\fR \fIFILE\fR Tells Guard to use FILE as its Guardfile instead of \fB\./Guardfile\fR or \fB~/\.Guardfile\fR\.
. .
.nf .SS "init [GUARD]"
If no Guardfile is present in the current directory, creates an empty Guardfile\.
Specify a Guardfile by giving its path\.
. .
.fi .P
. If \fIGUARD\fR is present, add its default Guardfile configuration to the current Guardfile\. Note that \fIGUARD\fR is the guard\'s name without the \fBguard\-\fR prefix\. For instance to initialize guard\-rspec, run \fBguard init rspec\fR\.
.IP "" 0
.
.SS "init [guard]"
Add the requested guard\'s default Guardfile configuration to the current Guardfile\.
. .
.SS "list" .SS "list"
Lists guards that can be used with the \fBinit\fR command\. Lists guards that can be used with the \fBinit\fR command\.
. .
.SS "\-T/show" .SS "\-T, show"
List defined groups and guards for the current Guardfile\. List defined groups and guards for the current Guardfile\.
. .
.SH "OPTIONS" .SS "\-h, help [COMMAND]"
.
.TP
\fB\-h\fR
List all of Guard\'s available commands\. List all of Guard\'s available commands\.
. .
.SS "start" .P
If \fICOMMAND\fR is given, displays a specific help for \fITASK\fR\.
. .
.SH "EXAMPLES" .SH "EXAMPLES"
Initialize Guard and a specific guard at the same time:
.
.P
\fB[bundle exec] guard init [rspec]\fR
.
.P
Run Guard:
.
.P
\fB[bundle exec] guard [start] \-\-watchdir ~/dev \-\-guardfile ~/env/Guardfile \-\-clear \-\-group backend frontend \-\-notify false \-\-debug\fR \fB[bundle exec] guard [start] \-\-watchdir ~/dev \-\-guardfile ~/env/Guardfile \-\-clear \-\-group backend frontend \-\-notify false \-\-debug\fR
. .
.P .P

View File

@ -57,7 +57,6 @@
<a href="#DESCRIPTION">DESCRIPTION</a> <a href="#DESCRIPTION">DESCRIPTION</a>
<a href="#SYNOPSIS">SYNOPSIS</a> <a href="#SYNOPSIS">SYNOPSIS</a>
<a href="#COMMANDS">COMMANDS</a> <a href="#COMMANDS">COMMANDS</a>
<a href="#OPTIONS">OPTIONS</a>
<a href="#EXAMPLES">EXAMPLES</a> <a href="#EXAMPLES">EXAMPLES</a>
<a href="#AUTHORS-CONTRIBUTORS">AUTHORS / CONTRIBUTORS</a> <a href="#AUTHORS-CONTRIBUTORS">AUTHORS / CONTRIBUTORS</a>
<a href="#WWW">WWW</a> <a href="#WWW">WWW</a>
@ -80,71 +79,69 @@
<h2 id="SYNOPSIS">SYNOPSIS</h2> <h2 id="SYNOPSIS">SYNOPSIS</h2>
<p>guard <var>command</var> <var>options</var></p> <p><code>guard &lt;COMMAND> &lt;OPTIONS></code></p>
<h2 id="COMMANDS">COMMANDS</h2> <h2 id="COMMANDS">COMMANDS</h2>
<h3 id="start">start</h3> <h3 id="start">start</h3>
<p> Starts Guard. This is the default command if none is provided.</p> <p>Starts Guard. This is the default command if none is provided.</p>
<p>The following options are available:</p> <p>The following options are available:</p>
<p> <code>-c</code>/<code>--clear</code></p> <p><code>-c</code>, <code>--clear</code>
Clears the Shell after each change.</p>
<pre><code> Clears the Shell after each change. <p><code>-n</code>, <code>--notify</code> <var>FLAG</var>
</code></pre> Disable notifications (Growl or Libnotify depending on your system).
Notifications can be disabled globally by setting a GUARD_NOTIFY environment variable to false.
FLAG can be <code>true</code>/<code>false</code> or <code>t</code>/<code>f</code>.</p>
<p> <code>-n</code>/<code>--notify</code> <var>flag</var></p> <p><code>-d</code>, <code>--debug</code>
Runs Guard in debug mode.</p>
<pre><code> Disable notifications (Growl or Libnotify depending on your system). <p><code>-g</code>, <code>--group</code> <var>GROUP1</var> <var>GROUP2</var>...
Note that notifications can also be disabled globally by setting a GUARD_NOTIFY environment variable to false. Runs only the groups specified by GROUP1, GROUP2 etc.
The &lt;flag> part can be passed to guard using true/false or t/f. Groups name should be separated by spaces.
</code></pre> Guards that don't belong to a group are considered global and are always run.</p>
<p> <code>-d</code>/<code>--debug</code></p> <p><code>-w</code>, <code>--watchdir</code> <var>PATH</var></p>
<pre><code> Runs Guard in debug mode. <p>Tells Guard to watch PATH instead of <code>./</code>.</p>
</code></pre>
<p> <code>-g</code>/<code>--group</code> <var>group</var> ...</p> <p><code>-G</code>, <code>--guardfile</code> <var>FILE</var>
Tells Guard to use FILE as its Guardfile instead of <code>./Guardfile</code> or <code>~/.Guardfile</code>.</p>
<pre><code> Runs only the groups specified. <h3 id="init-GUARD-">init [GUARD]</h3>
</code></pre>
<p> <code>-w</code>/<code>--watchdir</code> <var>folder</var></p> <p>If no Guardfile is present in the current directory, creates an empty Guardfile.</p>
<pre><code> Specify the directory to watch. <p>If <var>GUARD</var> is present, add its default Guardfile configuration to the current Guardfile.
</code></pre> Note that <var>GUARD</var> is the guard's name without the <code>guard-</code> prefix.
For instance to initialize guard-rspec, run <code>guard init rspec</code>.</p>
<p> <code>-G</code>/<code>--guardfile</code> <var>file</var></p>
<pre><code> Specify a Guardfile by giving its path.
</code></pre>
<h3 id="init-guard-">init [guard]</h3>
<p> Add the requested guard's default Guardfile configuration to the current Guardfile.</p>
<h3 id="list">list</h3> <h3 id="list">list</h3>
<p> Lists guards that can be used with the <code>init</code> command.</p> <p>Lists guards that can be used with the <code>init</code> command.</p>
<h3 id="-T-show">-T/show</h3> <h3 id="-T-show">-T, show</h3>
<p> List defined groups and guards for the current Guardfile.</p> <p>List defined groups and guards for the current Guardfile.</p>
<h2 id="OPTIONS">OPTIONS</h2> <h3 id="-h-help-COMMAND-">-h, help [COMMAND]</h3>
<dl> <p>List all of Guard's available commands.</p>
<dt class="flush"><code>-h</code></dt><dd>List all of Guard's available commands.</dd>
</dl>
<p>If <var>COMMAND</var> is given, displays a specific help for <var>TASK</var>.</p>
<h3 id="start">start</h3>
<h2 id="EXAMPLES">EXAMPLES</h2> <h2 id="EXAMPLES">EXAMPLES</h2>
<p>Initialize Guard and a specific guard at the same time:</p>
<p><code>[bundle exec] guard init [rspec]</code></p>
<p>Run Guard:</p>
<p><code>[bundle exec] guard [start] --watchdir ~/dev --guardfile ~/env/Guardfile --clear --group backend frontend --notify false --debug</code></p> <p><code>[bundle exec] guard [start] --watchdir ~/dev --guardfile ~/env/Guardfile --clear --group backend frontend --notify false --debug</code></p>
<p>or in a more concise way:</p> <p>or in a more concise way:</p>

View File

@ -1,77 +0,0 @@
guard(1) -- Guard keeps an eye on your file modifications.
========================================================
## DESCRIPTION
Guard is a command line tool that easily handle events on files modifications.
## SYNOPSIS
guard <command> <options>
## COMMANDS
### start
Starts Guard. This is the default command if none is provided.
The following options are available:
`-c`/`--clear`
Clears the Shell after each change.
`-n`/`--notify` <flag>
Disable notifications (Growl or Libnotify depending on your system).
Note that notifications can also be disabled globally by setting a GUARD_NOTIFY environment variable to false.
The <flag> part can be passed to guard using true/false or t/f.
`-d`/`--debug`
Runs Guard in debug mode.
`-g`/`--group` <group> ...
Runs only the groups specified.
`-w`/`--watchdir` <folder>
Specify the directory to watch.
`-G`/`--guardfile` <file>
Specify a Guardfile by giving its path.
### init [guard]
Add the requested guard's default Guardfile configuration to the current Guardfile.
### list
Lists guards that can be used with the `init` command.
### -T/show
List defined groups and guards for the current Guardfile.
## OPTIONS
* `-h`:
List all of Guard's available commands.
### start
## EXAMPLES
`[bundle exec] guard [start] --watchdir ~/dev --guardfile ~/env/Guardfile --clear --group backend frontend --notify false --debug`
or in a more concise way:
`[bundle exec] guard [start] -w ~/dev -G ~/env/Guardfile -c -g backend frontend -n f -d`
## AUTHORS / CONTRIBUTORS
Thibaud Guillaume-Gentil is the main author.
A list of contributors based on all commits can be found here:
https://github.com/guard/guard/contributors
For an exhaustive list of all the contributors, please see the CHANGELOG:
https://github.com/guard/guard/blob/master/CHANGELOG.md
This manual has been written by Remy Coutable.
## WWW
https://github.com/guard/guard

93
man/guard.ronn Normal file
View File

@ -0,0 +1,93 @@
guard(1) -- Guard keeps an eye on your file modifications.
========================================================
## DESCRIPTION
Guard is a command line tool that easily handle events on files modifications.
## SYNOPSIS
`guard <COMMAND> <OPTIONS>`
## COMMANDS
### start
Starts Guard. This is the default command if none is provided.
The following options are available:
`-c`, `--clear`
Clears the Shell after each change.
`-n`, `--notify` <FLAG>
Disable notifications (Growl or Libnotify depending on your system).
Notifications can be disabled globally by setting a GUARD_NOTIFY environment variable to false.
FLAG can be `true`/`false` or `t`/`f`.
`-d`, `--debug`
Runs Guard in debug mode.
`-g`, `--group` <GROUP1> <GROUP2>...
Runs only the groups specified by GROUP1, GROUP2 etc.
Groups name should be separated by spaces.
Guards that don't belong to a group are considered global and are always run.
`-w`, `--watchdir` <PATH>
Tells Guard to watch PATH instead of `./`.
`-G`, `--guardfile` <FILE>
Tells Guard to use FILE as its Guardfile instead of `./Guardfile` or `~/.Guardfile`.
### init [GUARD]
If no Guardfile is present in the current directory, creates an empty Guardfile.
If <GUARD> is present, add its default Guardfile configuration to the current Guardfile.
Note that <GUARD> is the guard's name without the `guard-` prefix.
For instance to initialize guard-rspec, run `guard init rspec`.
### list
Lists guards that can be used with the `init` command.
### -T, show
List defined groups and guards for the current Guardfile.
### -h, help [COMMAND]
List all of Guard's available commands.
If <COMMAND> is given, displays a specific help for <TASK>.
## EXAMPLES
Initialize Guard and a specific guard at the same time:
`[bundle exec] guard init [rspec]`
Run Guard:
`[bundle exec] guard [start] --watchdir ~/dev --guardfile ~/env/Guardfile --clear --group backend frontend --notify false --debug`
or in a more concise way:
`[bundle exec] guard [start] -w ~/dev -G ~/env/Guardfile -c -g backend frontend -n f -d`
## AUTHORS / CONTRIBUTORS
Thibaud Guillaume-Gentil is the main author.
A list of contributors based on all commits can be found here:
https://github.com/guard/guard/contributors
For an exhaustive list of all the contributors, please see the CHANGELOG:
https://github.com/guard/guard/blob/master/CHANGELOG.md
This manual has been written by Remy Coutable.
## WWW
https://github.com/guard/guard