App/ripgrep
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#p63d201f]
#contents();
/////////////////////////////////////////////////////////...
* ripgrep [#qf8f4cb3]
- ripgrep は、grep の高速な代替コマンド。
/////////////////////////////////////////////////////////...
* build [#pba858da]
- debian9 にはパッケージがないので、使うのであればビルド...
- build には cargo (The Rust package manager) が必要なの...
# apt-get install cargo
+ ソースコードの取得
$ git clone https://github.com/BurntSushi/ripgrep.git
$ cd ripgrep
$ git checkout refs/tags/12.0.1
+ README.md の記載に従いビルドする
$ cargo build --release
+ ビルド出来たか確認する
$ ./target/release/rg --version
+ ビルドして出来たコマンドの場所に環境変数 PATH を通すか...
/////////////////////////////////////////////////////////...
* grep とのオプション比較 [#r53574b8]
|~option (ripgrep) |~option (grep) |~descr...
|<pattern> |<pattern> |match ...
|-e <pattern> |-e <pattern> |<patte...
|-f <file> |-f <file> |パター...
| |-E, --extended-regexp |PATTER...
|-E, --encoding <ENC> | |検索す...
|-F, --fixed-strings |-F, --fixed-strings |PATTER...
|-A <num> |-A <num> |検索結...
|-B <num> |-B <num> |検索結...
|-C <num> |-C <num> |検索結...
|-H |-H |検索結...
|-h |--help |ヘルプ...
|-I, --no-filename |-h |検索結...
| |-I |バイナ...
|-j,--threads <num> | |使用す...
|-a |-a |バイナ...
|--no-filename |-h |検索結...
|-i, --ignore-case |-i, --ignore-case |入力フ...
|-l,--files-with-matches |-l,--files-with-matches |マッチ...
|-n |-n |検索結...
|-N | |検索結...
|-q |-q |標準出...
|-r,--r <replace-text> | |検索結...
| |-r,-R,--recursive |下位の...
|-t <TYPE> | |ファイ...
|-v |-v |<patte...
|-w, --word-regexp |-w, --word-regexp |マッチ...
|--no-heading | |grep ...
/////////////////////////////////////////////////////////...
* emacs から使う [#bd8a9737]
- [[ripgrep.el>https://github.com/nlamirault/ripgrep.el]]...
//=======================================================...
** ripgrep.el [#emacs-ripgrep_el]
//-------------------------------------------------------...
*** ripgrep.el の取得 [#bc3f5f43]
- 下記から取得出来る:
$ git clone https://github.com/nlamirault/ripgrep.el.git
//-------------------------------------------------------...
*** 設定 [#ydee1aeb]
- ${HOME}/bin などに rg コマンドファイルがある場合、 ripg...
このときは、以下のように require した後で設定を上書きする:
; ripgrep.el を読み込む
(require 'ripgrep)
; rg (ripgrep実行形式ファイル) へのパス
(setq ripgrep-executable "~/.cargo/bin/rg")
- ripgrep.el を使用する際に rg へ渡したいオプションがある...
; rgに渡すオプション
(setq ripgrep-arguments '("-S"))
/////////////////////////////////////////////////////////...
* 参考リンク [#k9d53c87]
- [[新世代grep 'ripgrep' - エクセレンス★ブログ>https://ww...
- [[第579回 高速で便利なgrep「ripgrep」を活用する:Ubunt...
- [[ripgrep.el>http://emacs.rubikitch.com/ripgrep/]]
終了行:
#topicpath
/////////////////////////////////////////////////////////...
* 目次 [#p63d201f]
#contents();
/////////////////////////////////////////////////////////...
* ripgrep [#qf8f4cb3]
- ripgrep は、grep の高速な代替コマンド。
/////////////////////////////////////////////////////////...
* build [#pba858da]
- debian9 にはパッケージがないので、使うのであればビルド...
- build には cargo (The Rust package manager) が必要なの...
# apt-get install cargo
+ ソースコードの取得
$ git clone https://github.com/BurntSushi/ripgrep.git
$ cd ripgrep
$ git checkout refs/tags/12.0.1
+ README.md の記載に従いビルドする
$ cargo build --release
+ ビルド出来たか確認する
$ ./target/release/rg --version
+ ビルドして出来たコマンドの場所に環境変数 PATH を通すか...
/////////////////////////////////////////////////////////...
* grep とのオプション比較 [#r53574b8]
|~option (ripgrep) |~option (grep) |~descr...
|<pattern> |<pattern> |match ...
|-e <pattern> |-e <pattern> |<patte...
|-f <file> |-f <file> |パター...
| |-E, --extended-regexp |PATTER...
|-E, --encoding <ENC> | |検索す...
|-F, --fixed-strings |-F, --fixed-strings |PATTER...
|-A <num> |-A <num> |検索結...
|-B <num> |-B <num> |検索結...
|-C <num> |-C <num> |検索結...
|-H |-H |検索結...
|-h |--help |ヘルプ...
|-I, --no-filename |-h |検索結...
| |-I |バイナ...
|-j,--threads <num> | |使用す...
|-a |-a |バイナ...
|--no-filename |-h |検索結...
|-i, --ignore-case |-i, --ignore-case |入力フ...
|-l,--files-with-matches |-l,--files-with-matches |マッチ...
|-n |-n |検索結...
|-N | |検索結...
|-q |-q |標準出...
|-r,--r <replace-text> | |検索結...
| |-r,-R,--recursive |下位の...
|-t <TYPE> | |ファイ...
|-v |-v |<patte...
|-w, --word-regexp |-w, --word-regexp |マッチ...
|--no-heading | |grep ...
/////////////////////////////////////////////////////////...
* emacs から使う [#bd8a9737]
- [[ripgrep.el>https://github.com/nlamirault/ripgrep.el]]...
//=======================================================...
** ripgrep.el [#emacs-ripgrep_el]
//-------------------------------------------------------...
*** ripgrep.el の取得 [#bc3f5f43]
- 下記から取得出来る:
$ git clone https://github.com/nlamirault/ripgrep.el.git
//-------------------------------------------------------...
*** 設定 [#ydee1aeb]
- ${HOME}/bin などに rg コマンドファイルがある場合、 ripg...
このときは、以下のように require した後で設定を上書きする:
; ripgrep.el を読み込む
(require 'ripgrep)
; rg (ripgrep実行形式ファイル) へのパス
(setq ripgrep-executable "~/.cargo/bin/rg")
- ripgrep.el を使用する際に rg へ渡したいオプションがある...
; rgに渡すオプション
(setq ripgrep-arguments '("-S"))
/////////////////////////////////////////////////////////...
* 参考リンク [#k9d53c87]
- [[新世代grep 'ripgrep' - エクセレンス★ブログ>https://ww...
- [[第579回 高速で便利なgrep「ripgrep」を活用する:Ubunt...
- [[ripgrep.el>http://emacs.rubikitch.com/ripgrep/]]
ページ名: