Made the README even more gorgeous!

This commit is contained in:
Rémy Coutable 2011-05-07 19:09:43 +02:00
parent 057549a84d
commit b7137bbf0c

View File

@ -22,7 +22,9 @@ Install
Install the gem: Install the gem:
`$ gem install guard` ``` bash
$ gem install guard`
```
Add it to your Gemfile (inside the `test` group): Add it to your Gemfile (inside the `test` group):
@ -32,7 +34,9 @@ gem 'guard'
Generate an empty Guardfile with: Generate an empty Guardfile with:
`$ guard init` ``` bash
$ guard init`
```
Add the guards you need to your Guardfile (see the existing guards below). Add the guards you need to your Guardfile (see the existing guards below).
@ -40,11 +44,15 @@ Add the guards you need to your Guardfile (see the existing guards below).
Install the rb-fsevent gem for [FSEvent](http://en.wikipedia.org/wiki/FSEvents) support: Install the rb-fsevent gem for [FSEvent](http://en.wikipedia.org/wiki/FSEvents) support:
`$ gem install rb-fsevent` ``` bash
$ gem install rb-fsevent`
```
Install the Growl gem if you want notification support: Install the Growl gem if you want notification support:
`$ gem install growl` ``` bash
$ gem install growl`
```
And add it to you Gemfile: And add it to you Gemfile:
@ -56,11 +64,15 @@ gem 'growl'
Install the rb-inotify gem for [inotify](http://en.wikipedia.org/wiki/Inotify) support: Install the rb-inotify gem for [inotify](http://en.wikipedia.org/wiki/Inotify) support:
`$ gem install rb-inotify` ``` bash
$ gem install rb-inotify`
```
Install the Libnotify gem if you want notification support: Install the Libnotify gem if you want notification support:
`$ gem install libnotify` ``` bash
$ gem install libnotify`
```
And add it to you Gemfile: And add it to you Gemfile:
@ -72,42 +84,56 @@ gem 'libnotify'
Install the rb-fchange gem for [Directory Change Notification](http://msdn.microsoft.com/en-us/library/aa365261\(VS.85\).aspx) support: Install the rb-fchange gem for [Directory Change Notification](http://msdn.microsoft.com/en-us/library/aa365261\(VS.85\).aspx) support:
`$ gem install rb-fchange` ``` bash
$ gem install rb-fchange`
```
Usage Usage
----- -----
Just launch Guard inside your Ruby / Rails project with: Just launch Guard inside your Ruby / Rails project with:
`$ guard [start]` ``` bash
$ guard [start]`
```
or if you use Bundler, to run the Guard executable specific to your bundle: or if you use Bundler, to run the Guard executable specific to your bundle:
`$ bundle exec guard` ``` bash
$ bundle exec guard`
```
Command line options Command line options
-------------------- --------------------
Shell can be cleared after each change with: Shell can be cleared after each change with:
$ guard --clear ``` bash
$ guard -c # shortcut $ guard --clear
$ guard -c # shortcut
```
Notifications (growl/libnotify) can be disabled with: Notifications (growl/libnotify) can be disabled with:
$ guard --notify false ``` bash
$ guard -n false # shortcut $ guard --notify false
$ guard -n false # shortcut
```
Notifications can also be disabled by setting a `GUARD_NOTIFY` environment variable to `false` Notifications can also be disabled by setting a `GUARD_NOTIFY` environment variable to `false`
The guards to start can be specified by group (see the Guardfile DSL below) specifying the `--group` (or `-g`) option: The guards to start can be specified by group (see the Guardfile DSL below) specifying the `--group` (or `-g`) option:
$ guard --group group_name another_group_name ``` bash
$ guard -g group_name another_group_name # shortcut $ guard --group group_name another_group_name
$ guard -g group_name another_group_name # shortcut
```
Options list is available with: Options list is available with:
`$ guard help [TASK]` ``` bash
$ guard help [TASK]`
```
Signal handlers Signal handlers
--------------- ---------------
@ -133,7 +159,9 @@ gem '<guard-name>'
Insert default guard's definition to your Guardfile by running this command: Insert default guard's definition to your Guardfile by running this command:
`$ guard init <guard-name>` ``` bash
$ guard init <guard-name>
```
You are good to go! You are good to go!