8000 GitHub - davidrunger/fcom at v0.2.18
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

davidrunger/fcom

Repository files navigation

fcom ("find commit(s)")

This is a CLI tool that I use to parse the git history of a repo.

For example, if I use fcom to search this repo with fcom "line.(green|red)" --regex --repo davidrunger/fcom, I get this output:

Installation

The easiest way to install fcom is via the specific_install gem, which will pull and build the fcom gem directly from the master branch of this repo:

gem install specific_install
gem specific_install davidrunger/fcom

Dependencies

This gem assumes that you have git and rg (ripgrep) installed.

Basic usage

$ fcom <search string> [options]

Available options and examples

After installing, execute fcom --help to see usage examples and available options.

$ fcom --help

Usage: fcom <search string> [options]

Examples:
  fcom update
  fcom 'def update'
  fcom "def update" --days 60
  fcom "[Uu]ser.*slug" -d 365 --regex
  fcom options --path spec/
  fcom "line.(green|red)" -d 365 --regex --repo davidrunger/fcom

    --repo             GitHub repo (in form `username/repo`)
    -d, --days         number of days to search back
    -r, --regex        interpret search string as a regular expression
    -i, --ignore-case  search case-insensitively
    -p, --path         path (directory or file) used to filter results
    --debug            print debugging info
    -v, --version      print the version
    -h, --help         print this help information

.fcom.yml config file

We highly recommend that you create a .fcom.yml file in any repository that you plan to search with fcom. (You might (or might not) want to add .fcom.yml to your ~/.gitignore_global file so that this file is not tracked by git.)

Example .fcom.yml config file

repo: githubusername/reponame

The advantage of creating an .fcom.yml config file is that it will make the fcom command execute more quickly, because time will not be wasted parsing the output of git remote ... in order to determine the URL of the repo's remote repository (which is used to construct links to matching commits).

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bin/release, which will create a git tag for the version and push git commits and tags.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/davidrunger/fcom.

License

The gem is available as open source under the terms of the MIT License.

About

CLI tool for parsing git history

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0