| Crates.io | patty |
| lib.rs | patty |
| version | 0.1.1 |
| created_at | 2024-05-12 02:27:36.33048+00 |
| updated_at | 2024-05-12 05:42:42.971224+00 |
| description | Cross platform system PATH manager. |
| homepage | https://github.com/thewh1teagle/patty |
| repository | https://github.com/thewh1teagle/patty |
| max_upload_size | |
| id | 1237194 |
| size | 45,178 |
Cross platform system PATH manager.
Patty enables you to manage and modify the system PATH variable on Windows, Linux, and macOS.
It's particularly useful for CLI apps that need to be accessible in PATH.
Patty achieves this by modifying the registry in Windows and adjusting RC files in Linux/macOS, such as zshrc or bashrc.
cargo add patty
use patty::{PathManager, Options, home_dir};
fn main() {
let mut patty = patty::Patty::new(Options::default());
let bin_path = home_dir().unwrap().join("bin");
let new_path = patty.add(bin_path).unwrap();
println!("PATH = {:?}", new_path);
}
see examples
Inspired by github.com/rust-lang/rustup