To make scripts accessible from anywhere in your terminal, follow these steps:
-
Clone the repository to your local machine
-
Move into the cloned directory
-
Add the scripts to the PATH variable:
- Linux / MacOS:
echo "export PATH=\"\$PATH:$(pwd)/bin\"" >> ~/.bashrc source ~/.bashrc
- Windows (PowerShell):
$currentDir = Get-Location [Environment]::SetEnvironmentVariable("Path", "$env:Path;$currentDir\bin", "User") $env:Path = [System.Environment]::GetEnvironmentVariable("Path","User") + ";" + [System.Environment]::GetEnvironmentVariable("Path","Machine")
-
Execute script
- Linux / MacOS:
./<script>
- Windows (wsl via PowerShell):
wsl <script>