Skip to content

Isaac-Subirana/what

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

"What": an adaptation of Linux's "which" (or Windows' "where"), written in Rust

This utility searches for all of the occurrences of the passed arguments in your system's PATH (appending all of the PATH extensions if you are on Windows or checking if the found files have execution permissions in Linux).

Usage:

what [options] <arguments>

Available options:

  • [no options] : shows all the occurrences of the passed arguments found in the system's PATH and colored messages enumerating them.
  • -m (minimal) : shows a minimal, non-colored, which-like output (only one occurrence of each argument and no extra messages).
  • -s (silent) : runs silently and returns 0 if one occurrence of every argument is found (and 1 otherwise). Will override -m if both are passed.
  • -h or --help (help) : shows a help menu detailing these options and the usage of the utility. Will override all other arguments passed.

Usage examples:

In Windows:
Usage examples for "what" in Windows

In Linux: Usage examples for "what" in Linux

How to get it:

You can download the pre-compiled binary suitable for your x86_64 system from the Releases tab of this repository, and add it to your PATH (on Linux, you will need to mark it as executable).

Alternatively, you can build it from source (you will need to have Rust installed), by cloning (or downloading) the contents of this repository, opening a terminal in your chosen location and then running cargo build --release. You will find the compiled binary in target/release.

About

An adaptation of Linux's "which", written in Rust.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages