All Projects β†’ harryfei β†’ which-rs

harryfei / which-rs

Licence: MIT license
A Rust equivalent of Unix command "which".

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to which-rs

mican
🍊 A simple Unix shell written in Rust
Stars: ✭ 48 (-57.89%)
Mutual labels:  unix-command
pythonfinder
PythonFinder: Cross Platform Search Tool for Finding Pythons
Stars: ✭ 30 (-73.68%)
Mutual labels:  which
lookpath
The minimum and most straightforward way to check if command exists and where the executable is, without spawning child_process.
Stars: ✭ 49 (-57.02%)
Mutual labels:  which
tpack
Pack a Go workflow/function as a Unix-style pipeline command
Stars: ✭ 55 (-51.75%)
Mutual labels:  unix-command
useful-unix-stuff
a collection of useful unix commands/scripts/etc.
Stars: ✭ 64 (-43.86%)
Mutual labels:  unix-command
port-scanner
Port scanner in Go
Stars: ✭ 33 (-71.05%)
Mutual labels:  unix-command
RecoverPy
πŸ™ˆ Interactively find and recover deleted or πŸ‘‰ overwritten πŸ‘ˆ files from your terminal
Stars: ✭ 189 (+65.79%)
Mutual labels:  unix-command
Sistem-programlama
Sistem Programlama Türkçe Kaynak (KTÜ)
Stars: ✭ 30 (-73.68%)
Mutual labels:  unix-command
utility
Collection of command line utilities
Stars: ✭ 36 (-68.42%)
Mutual labels:  unix-command

Build Status

which

A Rust equivalent of Unix command "which". Locate installed executable in cross platforms.

Support platforms

  • Linux
  • Windows
  • macOS

Examples

  1. To find which rustc executable binary is using.

    use which::which;
    
    let result = which("rustc").unwrap();
    assert_eq!(result, PathBuf::from("/usr/bin/rustc"));
  1. After enabling the regex feature, find all cargo subcommand executables on the path:

    use which::which_re;
    
    which_re(Regex::new("^cargo-.*").unwrap()).unwrap()
        .for_each(|pth| println!("{}", pth.to_string_lossy()));

Documentation

The documentation is available online.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].