首页
/ Matcher 项目技术文档

Matcher 项目技术文档

2024-12-27 11:36:23作者:俞予舒Fleming

本文档旨在帮助用户安装、使用 Matcher 库,并详细介绍其 API 使用方法。

1. 安装指南

Matcher 是一个独立的库,其安装步骤如下:

$ make
# 将 `matcher` 移动到有用的位置
$ make install
# `make install` 会将 Matcher 安装到 /usr/local/bin 目录。

2. 项目使用说明

Matcher 在文件名列表中搜索字符串,并返回最有可能指代的文件。其工作原理与 fuzzy-finder、Command-T 等类似。

使用方法:

$ matcher [options] <search>

选项:

  • --limit: 返回匹配的数量(默认为 10)
  • --no-dotfiles: 从不返回点文件(默认情况下,可能会返回)
  • --manifest: 指定包含文件列表的文件。如果没有给定,Matcher 将从标准输入中读取列表。

示例

$ matcher --limit 20 --no-dotfiles --manifest filelist.txt customer.rb
$ find . | matcher order

3. 项目API使用文档

Matcher API 的使用方法已在上述使用说明中展示。以下是具体参数的详细说明:

  • <search>: 要搜索的字符串。
  • [options]: 可选参数,包括 --limit--no-dotfiles--manifest

4. 项目安装方式

Matcher 的安装方式如下:

$ make
# 将 `matcher` 移动到有用的位置
$ make install
# `make install` 会将 Matcher 安装到 /usr/local/bin 目录。

以上就是 Matcher 项目的技术文档,希望对您有所帮助。

登录后查看全文
热门项目推荐