Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Interacting with Guard
Clone this wiki locally
Guard shows a Pry console whenever it has nothing to do and comes with some Guard specific Pry commands:
all: Run all plugins.
help: Show help for all interactor commands.
change: Trigger a file change.
notification: Toggles the notifications.
pause: Toggles the file listener.
reload: Reload all plugins.
scope: Scope Guard actions to plugins or groups.
show: Show all Guard plugins.
exit: Stop all plugins and quit Guard
reload commands supports an optional scope, so you limit the Guard action to either a Guard plugin or
a Guard group like:
 guard(main)> all rspec  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
You can also disable the interactions completely by running Guard with the
Further Guard specific customizations can be made in
~/.guardrc that will be evaluated prior the Pry session is
~/.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.
Ctrl-C exits Guard and
Ctrl-D is ignored.
$ kill -USR1 <guard_pid>
$ kill -USR2 <guard_pid>