projroot

Crates.ioprojroot
lib.rsprojroot
version0.1.0
sourcesrc
created_at2023-06-29 01:28:53.979334
updated_at2023-06-29 01:28:53.979334
descriptionSmall tool to guess the root directory of the project containing the current working directory
homepagehttps://github.com/roguelazer/projroot
repositoryhttps://github.com/roguelazer/projroot
max_upload_size
id902886
size19,577
James Brown (Roguelazer)

documentation

README

This is a tiny application for finding the root of a project.

CI Crates.io

I would recommend setting it up as an alias in your shell; something like

alias cdpr "cd (projroot)"

This project is heavily-inspired by vim-rooter.

If you work a lot with submodules or other use cases where the first VCS directory doesn't represent the root of your project, you might try the -m farthest mode to instead look for the most distant VCS directory.

We currently use the presence of any of the following to determine if something is a project root:

  • .git
  • _darcs
  • .hg
  • .bzr
  • .svn

This should work on all supported Rust platforms, although the single-filesystem functionality only works on Unix-like platforms. It even works on WASI with wasmtime, presuming you grant FS access!

This work is licensed under the ISC license, a copy of which can be found at LICENSE.txt

Development

This project uses pre-commit; please install it and set up the hooks with pre-commit install.

Commit count: 7

cargo fmt