Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chtozamm/add-pathentry
A command-line utility for adding entries to PATH environment variable
https://github.com/chtozamm/add-pathentry
go registry windows
Last synced: 2 months ago
JSON representation
A command-line utility for adding entries to PATH environment variable
- Host: GitHub
- URL: https://github.com/chtozamm/add-pathentry
- Owner: chtozamm
- License: mit
- Created: 2024-11-10T10:10:01.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2024-11-15T12:20:49.000Z (2 months ago)
- Last Synced: 2024-11-19T21:14:28.845Z (2 months ago)
- Topics: go, registry, windows
- Language: Go
- Homepage:
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Add-PathEntry
A command-line tool for adding an entry to the user PATH environment variable on Windows. The utility can take a relative or absolute directory path as a command-line argument or default to the current working directory if no argument is provided.
## Requirements
[Go](https://go.dev/) is required to build and install this application.
## Installation
```
go install github.com/chtozamm/Add-PathEntry@latest
```## Usage
```
Usage: Add-PathEntry [path]
If no path is provided, the current working directory will be added to the PATH.
```## Examples
Add a directory to the PATH using absolute filepath:
```
> Add-PathEntry C:\MyFolder
Successfully added "C:\MyFolder" to user PATH.
```1. Add current working directory to the PATH
2. Try to add it the second time
3. Add a parent directory using a relative filepath```
my-project > Add-PathEntry
Successfully added "C:\Users\Home\my-project" to user PATH.my-project > Add-PathEntry
"C:\Users\Home\my-project" is already in the PATH.my-project > Add-PathEntry ../
Successfully added "C:\Users\Home" to user PATH.
```