lib/modulesync/cli.rb in modulesync-0.1.0 vs lib/modulesync/cli.rb in modulesync-0.2.0

- old
+ new

@@ -33,11 +33,11 @@ def parse_opts(args) @options = defaults @options.merge!(Hash.transform_keys_to_symbols(Util.parse_config(MODULESYNC_CONF_FILE))) @options[:command] = args[0] if commands_available.include?(args[0]) opt_parser = OptionParser.new do |opts| - opts.banner = "Usage: msync update [-m <commit message>] [-c <directory> ] [--noop] [-n <namespace>] [-b <branch>] | hook activate|deactivate [-c <directory> ] [-n <namespace>] [-b <branch>]" + opts.banner = "Usage: msync update [-m <commit message>] [-c <directory> ] [--noop] [-n <namespace>] [-b <branch>] [-f <filter>] | hook activate|deactivate [-c <directory> ] [-n <namespace>] [-b <branch>]" opts.on('-m', '--message <msg>', 'Commit message to apply to updated modules') do |msg| @options[:message] = msg end opts.on('-n', '--namespace <url>', @@ -49,9 +49,13 @@ @options[:configs] = configs end opts.on('-b', '--branch <branch>', 'Branch name to make the changes in. Defaults to "master"') do |branch| @options[:branch] = branch + end + opts.on('-f', '--filter <filter>', + 'A regular expression to filter repositories to update.') do |filter| + @options[:filter] = filter end opts.on('--noop', 'No-op mode') do |msg| @options[:noop] = true end