Permalink
Browse files

Document to new interactor features.

  • Loading branch information...
1 parent a9be057 commit 3af5d89aace08fe1690f7237d73bd629b2085136 @netzpirat netzpirat committed Oct 20, 2011
Showing with 35 additions and 11 deletions.
  1. +35 −11 README.md
View
@@ -349,20 +349,44 @@ read more about these files in the shared configuration section below.
Interactions
------------
-When Guard do nothing you can interact with by entering a command + hitting return/enter:
+You can interact with Guard and enter commands when Guard has nothing to do. You'll see a command prompt `>` when Guard
+is ready to accept a command. The command line supports history navigation and auto-completion by pressing TAB.
-* `stop`: `stop|quit|exit|s|q|e + return` - Calls each Guard's `#stop` method, in the same order they are declared
- in the `Guardfile`, and then quits Guard itself.
-* `reload`: `reload|r|z + return` - Calls each Guard's `#reload` method, in the same order they are declared in the
- `Guardfile`.
-* `pause`: `pause|p + return` - Toggle files modification listening. Useful when switching git branches.
-* `run_all`: `just return (no commands)` - Calls each Guard's `#run_all` method, in the same order they are declared in
- the `Guardfile`.
netzpirat
netzpirat Oct 20, 2011 Contributor

I hope you're fine with this. There is a lot of implementation detail in the README. I think the normal user wants to read reload and run instead of "Call each Guard's #run_all method.

I also removed the users choice: Just one command and a shortcut, instead of three choices and three shortcuts for the same command. But we can change it back if you want.

rymai
rymai Oct 20, 2011 Owner

Totally fine with me, but please, stop being too awesome! :D

This readline feature should (almost) make Guard go directly 1.0, I'm so jaw-dropped right now!!!!!!!!! That's huge!!! 👏

netzpirat
netzpirat Oct 20, 2011 Contributor

Haha, don't worry! I'm already over my weekly OSS time limit, so no new features this week - I promise. We'll see how readline is in practice: I had no problems with it, but there are many blog posts about readline on OS X around (because it uses libedit instead of GNU readline). But in the worst case we can make a switch to turn readline support off.

thibaudgg
thibaudgg Oct 20, 2011 Owner

Yeah, so good stuff here! I'm ok with just one command and a shortcut, easier to document and handle!
I'm blown away, can't wait to see version 0.9.0 released! (and made the new colorful README "public")

netzpirat
netzpirat Oct 20, 2011 Contributor

I'd only like to have some more feedback before an official release. Perhaps we should make a pre-release. The last one, 0.7.0.rc1 was at least downloaded 89 times.

rymai
rymai Oct 20, 2011 Owner

You're right. :)

thibaudgg
thibaudgg Oct 21, 2011 Owner

Ok, so let's go to 0.9.0.rc1 :)

netzpirat
netzpirat Oct 21, 2011 Contributor

I still have some minor issues with the interactor, I think I'll have to use Guard for a day or two on my own before releasing a rc.

thibaudgg
thibaudgg Oct 21, 2011 Owner

Yeah, I have a "small" issue too :), when the interactor listens (> is present in the console), run_on_change aren't executed (certainly an issue on how interactor thread are stopped/paused)

netzpirat
netzpirat Oct 21, 2011 Contributor

I have this issue when running within Guard, but not when running within another project. Strange...

thibaudgg
thibaudgg Oct 21, 2011 Owner

Using rb-readline fix the issue, and even better it'll work on Windows :)

From https://github.com/luislavena/rb-readline:

First, building the GNU readline library on MS Windows with Visual C++ is
almost impossible. However, certain libraries depend on readline. By providing
a pure Ruby version we eliminate the entire compiler compatibility issue.

Committed here. Ok for you?

+You can execute the following commands:
-`reload` and `run_all` actions can be scoped to only run on a certain guard or group. Examples:
+* `help`: Show a help of the available interactor commands.
+* `exit`: Stop all Guards and quit Guard.
+* `reload`: Reload all Guards.
+* `pause`: Toggles the file modification listener and the prompt will change to `p>`. Useful when switching Git
+ branches.
+* `<return>`: Run all Guards.
+* 'notification': Toggle system notifications on and off.
-* `backend reload + return` - Call only each guard's `#reload` method on backend group.
-* `rspec + return` - Call only RSpec guard's `#run_all` method.
+You can also execute a command by entering its first letter only. For example, `exit` can be executed by `e` also.
+
+Instead of running all Guards by pressing `<enter>`, you can also run a single Guard by entering its name:
+
+```bash
+> rspec
+```
+
+It's also possible to run all Guards within a group by entering the group name:
+
+```bash
+> frontend
+```
+
+The same applies to Guard reloading. You can reload a Guard with the following command:
+
+```bash
+> ronn reload
+```
+
+This will reload only the Ronn Guard. You can also reload all Guards within a group:
+
+```bash
+> backend reload
+```
Guardfile DSL
-------------

0 comments on commit 3af5d89

Please sign in to comment.