Skip to content

Instantly share code, notes, and snippets.

@rymai
Created June 5, 2012 21:48
Show Gist options
  • Save rymai/2878273 to your computer and use it in GitHub Desktop.
Save rymai/2878273 to your computer and use it in GitHub Desktop.
Trying to detect a Guard/Listen issue with folder that contains a '$' ( https://github.com/guard/guard/issues/287 )
$ mkdir test$
$ touch listen_with_dollar.rb
$ gem install listen guard guard-shell
$ guard init shell
$ ruby listen_with_dollar.rb
# create/modify/remove some files inside test$, Listen should pick up the changes, like this:
["/Users/remy/github/playground/listen_test/test$/yo"]
[]
[]
[]
[]
["/Users/remy/github/playground/listen_test/test$/ya"]
^C
$ guard
Guard uses GNTP to send notifications.
Guard is now watching at '/Users/remy/github/playground/listen_test'
# create/modify/remove some files inside test$, Guard should pick up the changes, like this:
test$/yo
test$/ya
guard 'shell' do
watch(/.+/) { |m| puts m }
end
require 'listen'
Listen.to('test$') do |modified, added, removed|
puts modified.inspect
puts added.inspect
puts removed.inspect
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment