Sha256: 7a40824ff321a334360d9b8820e38ca3be59512192cfe1eaedbd405b7d1fade6
Contents?: true
Size: 711 Bytes
Versions: 1
Compression:
Stored size: 711 Bytes
Contents
#!/usr/bin/env ruby require "slop" argv = ARGV.dup slop = Slop.new(:strict => true, :help => true) slop.on :s, :system_command=, 'system command name. eg. xdg-open, open (default is open)' slop.on :c, :cache=, 'use cache. yes or no. (default is yes)' slop.banner <<-BANNER $ anything-hub COMMANDS [OPTIONS] available COMMANDS are starred:USER_NAME search:SEARCH_KEYWORD BANNER begin slop.parse!(argv) rescue => e puts e exit! end options = slop.to_hash if options[:help] exit! end options.delete(:help) options[:s] ||= 'open' root = File.expand_path('../..', __FILE__) $LOAD_PATH.unshift root $LOAD_PATH.unshift File.join(root, 'lib') require 'anything-hub' AnythingHub.run(ARGV[0], options)
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
anything-hub-0.0.1 | bin/anything-hub |