ruby - gem(パッケージ管理) - ヘルプ

1. ヘルプ
2. コマンドについてのヘルプ

1. ヘルプ


> gem help
RubyGems is a sophisticated package manager for Ruby.  This is a
basic help message containing pointers to more information.

    gem -h/--help
    gem -v/--version
    gem command [arguments...] [options...]

    gem install rake
    gem list --local
    gem build package.gemspec
    gem help install

  Further help:
    gem help commands            list all 'gem' commands
    gem help examples            show some examples of usage
    gem help gem_dependencies    gem dependencies file guide
    gem help platforms           gem platforms guide
    gem help <COMMAND>           show help on COMMAND
                                   (e.g. 'gem help install')
    gem server                   present a web page at
                                 with info about installed gems
  Further information:

2. コマンドについてのヘルプ


gem help コマンド
 で、コマンドに関するヘルプが出力されるわけだ。  search について見るとこうなっていました。

> gem help search
Usage: gem search [REGEXP] [options]

    -i, --[no-]installed             Check for installed gem
    -I                               Equivalent to --no-installed
    -v, --version VERSION            Specify version of gem to search
                                     for use with --installed
    -d, --[no-]details               Display detailed information of gem(s)
        --[no-]versions              Display only gem names
    -a, --all                        Display all gem versions
    -e, --exact                      Name of gem(s) to query on matches the
                                     provided STRING
        --[no-]prerelease            Display prerelease versions

  Deprecated Options:
    -u, --[no-]update-sources        Update local source cache

  Local/Remote Options:
    -l, --local                      Restrict operations to the LOCAL domain
    -r, --remote                     Restrict operations to the REMOTE domain
    -b, --both                       Allow LOCAL and REMOTE operations
    -B, --bulk-threshold COUNT       Threshold for switching to bulk
                                     synchronization (default 1000)
        --clear-sources              Clear the gem sources
    -s, --source URL                 Append URL to list of remote gem sources
    -p, --[no-]http-proxy [URL]      Use HTTP proxy for remote operations

  Common Options:
    -h, --help                       Get help on this command
    -V, --[no-]verbose               Set the verbose level of output
    -q, --quiet                      Silence command progress meter
        --silent                     Silence RubyGems output
        --config-file FILE           Use this config file instead of default
        --backtrace                  Show stack backtrace on errors
        --debug                      Turn on Ruby debugging
        --norc                       Avoid loading any .gemrc file

    REGEXP        regexp to search for in gem name

    Display remote gems whose name matches REGEXP

    The search command displays remote gems whose name matches the given

    The --details option displays additional details from the gem but will
    take a little longer to complete as it must download the information
    individually from the index.

    To list local gems use the list command.

    --remote --no-details
 search する項目に関しては、REGEX と書いてあるので正規表現が使えるわけね。