Top/App/ripgrep

目次

ripgrep

build

  1. ソースコードの取得
    $ git clone https://github.com/BurntSushi/ripgrep.git
    $ cd ripgrep
    $ git co refs/tags/0.9.0
  2. README.md の記載に従いビルドする
    $ cargo build --release
  3. ビルド出来たか確認する
    $ ./target/release/rg --version
  4. ビルドして出来たコマンドの場所に環境変数 PATH を通すか、コマンドファイルを PATH の通っているところに移す。

grep とのオプション比較

option (ripgrep)option (grep)description
<pattern><pattern>match or unmatch pattern
-e <pattern>-e <pattern><pattern> をパターンとして指定する(POSIXに準拠)
-f <file>-f <file>パターンを <file> から1行を1パターンとして読み込む
-H-H検索結果にファイル名を付加する
-h--helpヘルプを表示
--no-filename-h検索結果にファイル名を付加しない
-i <file-path>-i <file-path><file-path> で指定されたファイルを検索対象から除く
-n-n検索結果に行番号を付加する
-N検索結果に行番号を付加しない
-q-q標準出力に何も出力しない
-t <TYPE>ファイルタイプが<TYPE> のものを検索対象にする
-v-v<pattern> で指定された文字列を含まないものを検索する

参考リンク


トップ   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS