Last active
February 15, 2023 01:00
-
-
Save gh640/c2cb562104482852201884f4ad0ce26a to your computer and use it in GitHub Desktop.
ripgrep コマンドチートシート
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 非表示ファイルを対象に含める | |
# -., --hidden | |
rg --hidden git | |
# マッチしない行を返す | |
# -v, --invert-match | |
rg -v 'docker' /var/log/syslog | |
# マッチした箇所のみを返す | |
# -o, --only-matching | |
rg -o 'docker-.*?\.' /var/log/syslog | |
# マッチ箇所を置換する | |
# -r, --replace | |
rg 'たこ' -r 'タコ' | |
# 大文字・小文字の区別を行わない | |
# -i, --ignore-case | |
rg -i deno | |
# 行番号を出力する(デフォルトで有効) | |
# -n, --line-number | |
rg -i node | |
# 行番号を出力しない | |
# -N, --no-line-number | |
rg -i typescript | |
# 設定ファイル( macOS の場合) | |
file ~/.config/ripgrep/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment