https://github.com/jftuga/fpp
Find Program Path: iterate through the PATH environment variable to search for the given programs
https://github.com/jftuga/fpp
Last synced: about 1 year ago
JSON representation
Find Program Path: iterate through the PATH environment variable to search for the given programs
- Host: GitHub
- URL: https://github.com/jftuga/fpp
- Owner: jftuga
- License: mit
- Created: 2020-12-28T12:29:53.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2021-11-09T14:29:06.000Z (over 4 years ago)
- Last Synced: 2025-01-29T23:29:54.492Z (over 1 year ago)
- Language: Go
- Size: 10.7 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fpp
Find Program Path: iterate through the `PATH` environment variable to search for the given programs
## Description
`fpp` returns the path names of the files (or links) which would be executed in the current environment. It does this by searching the `PATH` for executable files matching the names of the arguments.
This program also searches for over **30** extensions such as `.exe`, `.ps1`, `.sh`, `.py`, etc.
## Download
Binaries for Windows, MacOS, and Linux can be found on the [Releases Page](https://github.com/jftuga/fpp/releases) -- expand the `Assets` to see the downloads.
## Usage
```
Usage: fpp [OPTION]... [FILE]...
Find Program Path: Iterate through the PATH environment variable to search for the given programs
-p show all paths and then exit
-v show program version and then exit
```
## Install From Source
```
go get github.com/jftuga/fpp
cd fpp
go build -ldflags="-s -w"
./fpp (or .\fpp.exe)
```
## Examples
```
Notice that 'curl' appears 3 times and 'notepad' appears twice...
PS C:\github.com\jftuga\fpp> .\fpp.exe curl notepad compmgmt
C:\Windows\system32\curl.exe
C:\Windows\system32\notepad.exe
C:\Windows\system32\compmgmt.msc
C:\Windows\notepad.exe
C:\Users\john\scoop\shims\curl.exe
C:\Users\john\scoop\shims\curl.ps1
```
```
pi@rpi3:~/fpp $ ./fpp curl ping4 rg gettext
WARNING: '/usr/local/bin' appears multiple times in PATH
/usr/local/bin/rg
/usr/bin/curl
/usr/bin/gettext
/usr/bin/gettext.sh
/bin/ping4
```