wouterj/inspector 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

wouterj/inspector

最新稳定版本:v1.0.0-BETA1

Composer 安装命令:

composer require wouterj/inspector

包简介

A fast inspector to inspect and edit files

README 文档

README

Build Status

Inspector

Inspector is a simple tool that can be used to search in a directory for a given string or pattern.

Installation

Inspector is available as a composer package on packagist. Installing it is quite simple:

$ composer create-project wouterj/inspector

Usage

This is a quick documentation, advantage documentation is added during the BETA period

Inspector has just one command at this moment, called inspect. This will inspect a directory:

# searches for files which contains 'hello'
$ php inspector.php inspect -p 'hello'

This command has multiple options:

  • --pattern (-p): This is the pattern which you are looking for. (required)

    # searches for files which contains 'foo' or 'bar'
    $ php inspector.php inspect -p '/(foo|bar)/'
    
  • --dir (-d): This is the directory to search in, if this is empty it will search in the current directory.

    # searches in the %current_dir%/hello directory
    $ php inspector.php inspect -p 'foo' -d hello
    
  • --filter (-f): This can be a Regex, to determine which files should be ignored, or a name of one of the build in filters (more about this in the filters section).

    # ignores all php files
    $ php inspector.php inspect -p 'foo' -f '*.php'
    

Filters

Inspector has one build-in filter at the moment. Filters provide a solution for common --filter pattern.

GitIgnoreFilter

This filter will search for a .gitignore file in the root of the document and ingores every file that is in there.

$ php inspector.php inspect -p 'foo' --filter gitignore

Contributing

Inspector love contributors. Please, fork this repo, create a new branch, improve this code and open a PR. Inspector uses the Symfony Coding Standards

If you do not want to contribute with writing code, you can also help to review the issues/PRs.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2013-01-22