Home

Awesome

git-relative-status

git-relative-status is meant to provide a parseable output format for relative paths in a git repo. This is useful for providing a fuzzy finding interface for editors or shell functions.

Installation

Homebrew:

brew install keith/formulae/git-relative-status

Manually, after installing rust:

cargo install

You need to have source ~/.cargo/env somewhere in your shell configuration, then git-relative-status will be available from ~/.cargo/bin/git-relative-status.

Examples

$ pwd
/foo/bar/repo
$ echo "hi" >> README.md
$ git relative-status
README.md
$ mkdir foo; cd foo
$ git relative-status
../README.md

Why not use git status

If you want a parseable format, you should be using --porcelain to get a stable format (although realistically it probably won't change much in this case). Unfortunately this is not relative. This makes it difficult to fuzzy find files from a nested directory in a repo.

Why rust

$ time git-relative-status # Rust
0.07s user 0.24s system 166% cpu 0.189 total
$ time git-relative-status.py # Python
0.14s user 0.30s system 124% cpu 0.358 total

TODO