You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great to define the command executed by gsudo, when called without parameters (shell elevation) via an environment variable. This is especially useful when the shell was started with a special profile - e.g.
cmd /k profile.cmd
Proposed technical details
In the profile a special environment variable could be defined to set the correct shell elevation command - in the above case it could be
set GSUDO_CMD_ELEVATION=cmd /k profile.cmd --sudo
There can be special variables for every type of shell:
Optionally it would also be possible to have configuration settings - but I think environment variables are preferable and should have priority. For example in a "profile2.cmd" there would be
set GSUDO_CMD_ELEVATION=cmd /k profile2.cmd --sudo
I have implemented the environment version (except for wsl elevation) and could make a pull request if desired. In my implementation a "*" at the beginning of the command is replaced by the full path to the shell executable. So one could also use
set GSUDO_CMD_ELEVATION=* /k profile.cmd --sudo
or
set GSUDO_CMD_ELEVATION=* /k "%~f0" --sudo
The text was updated successfully, but these errors were encountered:
Description
It would be great to define the command executed by gsudo, when called without parameters (shell elevation) via an environment variable. This is especially useful when the shell was started with a special profile - e.g.
Proposed technical details
In the profile a special environment variable could be defined to set the correct shell elevation command - in the above case it could be
There can be special variables for every type of shell:
And also a "catch all" variable:
Optionally it would also be possible to have configuration settings - but I think environment variables are preferable and should have priority. For example in a "profile2.cmd" there would be
I have implemented the environment version (except for wsl elevation) and could make a pull request if desired. In my implementation a "*" at the beginning of the command is replaced by the full path to the shell executable. So one could also use
or
The text was updated successfully, but these errors were encountered: