Crates.io | projroot |
lib.rs | projroot |
version | 0.1.0 |
source | src |
created_at | 2023-06-29 01:28:53.979334 |
updated_at | 2023-06-29 01:28:53.979334 |
description | Small tool to guess the root directory of the project containing the current working directory |
homepage | https://github.com/roguelazer/projroot |
repository | https://github.com/roguelazer/projroot |
max_upload_size | |
id | 902886 |
size | 19,577 |
This is a tiny application for finding the root of a project.
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
This project uses pre-commit; please install it and set up the hooks with pre-commit install
.