You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you can do something in your shell, or in ruby, you can do it when a file changes
with guard-shell. It simply executes the block passed to watch if a change is
detected, and if anything is returned from the block it will be printed. For example
guard:shelldowatch/.*/do |m|
m[0] + " has changed."endend
will simply print a message telling you a file has been changed when it is changed.
This admittedly isn't a very useful example, but you hopefully get the idea. To run
everything on start pass :all_on_start to #guard,
guard:shell,:all_on_start=>truedo# ...end
There is also a shortcut for easily creating notifications,
#n takes up to three arguments; the first is the body of the message, here the path
of the changed file; the second is the title for the notification; and the third is
the image to use. There are three (four counting nil the default) different images
that can be specified :success, :pending and :failed.
Examples
Saying the Name of the File You Changed and Displaying a Notification