Enhancement for the project: setting up the PATH EnvVar
Closed this issue · 1 comments
benzaria commented
Repalce the set "Path=%Path%;C:\path\to\llm-term"
because it needs to be run every new prompt opens.
this will prevent that by adding it to the SysEnvVar Permanently
set "PATH=%PATH%;C:\path\to\llm-term" && PowerShell -NoProfile -Command "Start-Process -Wait -WindowStyle Hidden -Verb RunAs PowerShell -ArgumentList '-NoProfile', '-Command', \"[System.Environment]::SetEnvironmentVariable('Path', [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ';C:\path\to\llm-term', [System.EnvironmentVariableTarget]::Machine)\"" 2>nul && echo �[92mPath has been Added Successfully�[0m || echo �[91mError: Elevated Privileges not Granted.�[0m
It is better to make this line of code into a batchfile to accept the path\to\llm-term as an argument as folow:
echo %PATH% | find /i "llm-term" >nul || set "PATH=%PATH%;%~1" && PowerShell -NoProfile -Command "Start-Process -Wait -WindowStyle Hidden -Verb RunAs PowerShell -ArgumentList '-NoProfile', '-Command', \"[System.Environment]::SetEnvironmentVariable('Path', [System.Environment]::GetEnvironmentVariable('Path', [System.EnvironmentVariableTarget]::Machine) + ';%~1', [System.EnvironmentVariableTarget]::Machine)\"" 2>nul && echo �[92mPath has been Added Successfully.�[0m && exit /b 0 || echo �[91mError: Elevated Privileges not Granted.�[0m && exit /b 1
echo �[93mPath Already Exist.�[0m
and run the file: file "C:\path\to\llm-term"
dh1011 commented
Thank you for your suggestion. I have added instructions for permanently setting llm-term in the PATH for both Linux shell and PowerShell in the README.md file.