diff options
author | Sébastien Martini <seb@dbzteam.org> | 2013-12-23 03:58:22 -0800 |
---|---|---|
committer | Sébastien Martini <seb@dbzteam.org> | 2013-12-23 03:58:22 -0800 |
commit | e0373400336c8e0da891acfba0c5a992a08df65e (patch) | |
tree | 8dfe58503359ddc76737dcf43dcf0719cd54be25 /python2/pyinotify.py | |
parent | 51aa5bd8c22c5ff8c730f97178f000b55cb02f0f (diff) | |
parent | a9a07cd3879ce165c2ac01fa242ad93f40a6ac6b (diff) | |
download | pyinotify-e0373400336c8e0da891acfba0c5a992a08df65e.tar.gz |
Merge pull request #61 from grooverdan/glob
add glob option to command line
Diffstat (limited to 'python2/pyinotify.py')
-rwxr-xr-x | python2/pyinotify.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/python2/pyinotify.py b/python2/pyinotify.py index 7d6b05f..a14793c 100755 --- a/python2/pyinotify.py +++ b/python2/pyinotify.py @@ -2258,6 +2258,9 @@ def command_line(): parser.add_option("-a", "--auto_add", action="store_true", dest="auto_add", help="Automatically add watches on new directories") + parser.add_option("-g", "--glob", action="store_true", + dest="glob", + help="Treat paths as globs") parser.add_option("-e", "--events-list", metavar="EVENT[,...]", dest="events_list", help=("A comma-separated list of events to watch for - " @@ -2333,7 +2336,7 @@ def command_line(): log.debug('Start monitoring %s, (press c^c to halt pyinotify)' % path) - wm.add_watch(path, mask, rec=options.recursive, auto_add=options.auto_add) + wm.add_watch(path, mask, rec=options.recursive, auto_add=options.auto_add, do_glob=options.glob) # Loop forever (until sigint signal get caught) notifier.loop(callback=cb_fun) |