Interacting with Guard
Guard shows a Pry console whenever it has nothing to do and comes with some Guard specific Pry commands:
-
↩
,a
,all
: Run all plugins. -
h
,help
: Show help for all interactor commands. -
c
,change
: Trigger a file change. -
n
,notification
: Toggles the notifications. -
p
,pause
: Toggles the file listener. -
r
,reload
: Reload all plugins. -
o
,scope
: Scope Guard actions to plugins or groups. -
s
,show
: Show all Guard plugins. -
e
,exit
: Stop all plugins and quit Guard
The all
and reload
commands supports an optional scope, so you limit the Guard action to either a Guard plugin or
a Guard group like:
[1] guard(main)> all rspec
[2] guard(main)> all frontend
Remember, you can always use help
on the Pry command line to see all available commands and help <command>
for
more detailed information. help guard
will show all Guard related commands available
Pry supports the Ruby built-in Readline, rb-readline and
Coolline. Just install the readline implementation of your choice by adding it
to your Gemfile
.
You can also disable the interactions completely by running Guard with the --no-interactions
option.
Further Guard specific customizations can be made in ~/.guardrc
that will be evaluated prior the Pry session is
started (~/.pryrc
is ignored). This allows you to make use of the Pry plugin architecture to provide custom commands
and extend Guard for your own needs and distribute as a gem. Please have a look at the
Pry Wiki for more information.
You can also interact with Guard by sending POSIX signals to the Guard process (all but Windows and JRuby).
If the Pry interactor is used, then Ctrl-C
is delegated to Pry to exit continuation and Ctrl-D
to exit Guard.
Without interactor, Ctrl-C
exits Guard and Ctrl-D
is ignored.
$ kill -USR1 <guard_pid>
$ kill -USR2 <guard_pid>
This wiki and the Guard README document contain a lot of information, please take your time and read these instructions carefully.
If you run into any trouble, you may start by understanding how Guard works.
We provide detailed changes for each Guard release.
Be sure to read the CONTRIBUTING guidelines before reporting a new Guard issue or open a pull request.
If you have any questions about the Guard usage or want to share some information with the Guard community, please go to one of the following places:
- Google+ community
- Google group
- StackOverflow
- IRC channel
#guard
(irc.freenode.net) for chatting