文件检索相关命令行工具

玖亖伍
2023-03-06 / 0 评论 / 178 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2023年06月05日,已超过325天没有更新,若内容或图片失效,请留言反馈。

BAT

A cat(1) clone with wings.

特性:

  • 语法高亮
  • Git 集成
  • 不可打印(non-printable)字符可视化
  • 自动分页

fzf

A command-line fuzzy finder

fd

A simple, fast and user-friendly alternative to 'find'

ripgrep((rg))

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

ripgrep 常用命令示例:

# 查看支持的类型(type)列表
rg --type-list
# 添加一个自定义的类型 mmkkdd, 后缀名为 *.md, 排除.git、bin、obj、node_modules文件夹,搜索 babel
rg --type-add "mmkkdd:*.md" -g "!**/.git" -g "!**/bin" -g "!**/obj" -g "!**/node_modules" --type mmkkdd -- babel
# 添加一个自定义的类型 myscript, 后缀名包含 *.ps1,*.cmd,*.bat, 排除.git、bin、obj、node_modules文件夹,搜索 dotnet
rg --type-add "myscript:*.{ps1,cmd,bat}" -g "!**/.git" -g "!**/bin" -g "!**/obj" -g "!**/node_modules" --type myscript -- dotnet

注意: 参数用引号包裹时,windows上用双引号 ", 类Unix 上用单引号 '

0

评论 (0)

取消