Skip to content
/ unpath Public

unpath runs a command with a modified PATH that does not contain the given command(s)

License

Notifications You must be signed in to change notification settings

3v0k4/unpath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unpath

Usage: unpath UNCMD CMD

unpath runs CMD with a modified PATH that does not contain UNCMD.

Arguments:
  UNCMD the command to hide from PATH
  CMD   the command to run with the modified PATH

Examples:
  unpath cat ./script script-arg

  unpath cat CMD subcmd-arg

  unpath cat unpath env CMD

Users

FaviconFactory uses unpath to test selectively the Vips or ImageMagick integration.

Installation

You can install unpath with Go:

go install github.com/3v0k4/unpath

Or fetch the executable from GitHub:

# PLATFORM {linux,darwin}
# ARCHITECTURE {amd64,arm64}
curl --location https://github.com/3v0k4/unpath/releases/download/v0.1.0/unpath-PLATFORM-ARCH --output unpath
chmod +x unpath
./unpath

Usage

unpath cat ./script script-arg

unpath cat command command-arg

To show all the options:

unpath

Development

Unpath is dependency-free (it only uses the Go standard library), so there are no prerequisites.

go test

To release a new version add a tag and push:

git tag vX.Y.Z
git push --tags

Contributing

Bug reports and pull requests are welcome on GitHub.

License

The module is available as open source under the terms of the MIT License.

About

unpath runs a command with a modified PATH that does not contain the given command(s)

Resources

License

Stars

Watchers

Forks

Packages

No packages published