ptags

A parallel universal-ctags wrapper for git repository

Build Status Crates.io

Description

ptags is a universal-ctags wrapper to have the following features. - Search git tracked files only ( .gitignore support ) - Call ctags command in parallel for acceleration -- About x4 faster than universal-ctags at large repository

Install

Download from release page, and extract to the directory in PATH.

Alternatively you can install by cargo.

cargo install ptags

Requirement

ptags uses ctags and git command internally. The tested version is below.

| Command | Version | | ------- | ----------------------------------------------------- | | ctags | Universal Ctags 0.0.0(f9e6e3c1) / Exuberant Ctags 5.8 | | git | git version 2.14.2 |

Usage

``` ptags 0.1.0 dalance@gmail.com A parallel ctags wrapper for git repository

USAGE: ptags [FLAGS] [OPTIONS] [--] [DIR]

FLAGS: -h, --help Prints help information -s, --stat -V, --version Prints version information -v, --verbose

OPTIONS: --ctags-bin [default: ctags] -c, --ctags-opt ... --git-bin [default: git] -g, --git-opt ... -f, --file [default: tags] -t, --thread [default: 8]

ARGS:

[default: .] ```

You can pass options to ctags by-c/--ctags_opt option like below.

ptags -c='--exclude=aaa/*' -c='--exclude=bbb/*'

Benchmark

Environment

Data

Result

ptags is about x4 faster than universal-ctags.

| Command | Version | Averaged time ( 10 times execution ) | Speed-up | | ------------- | ------------------------------- | ------------------------------------- | -------- | | ctags -R | Universal Ctags 0.0.0(f9e6e3c1) | 23.64s | x1 | | ptags -t 16 | ptags 0.1.0 | 5.94s | x3.98 |