Skip to content

Add su command - #50

Open
PRO-2684 wants to merge 3 commits into
lukesampson:masterfrom
PRO-2684:master
Open

Add su command#50
PRO-2684 wants to merge 3 commits into
lukesampson:masterfrom
PRO-2684:master

Conversation

@PRO-2684

@PRO-2684 PRO-2684 commented Jan 13, 2024

Copy link
Copy Markdown

This implementation of su simply runs sudo powershell. It would be better if the elevated shell remains consistent with original shell, but I lack necessary knowledge of Powershell programming to implement that.

Comment thread su.ps1 Outdated
@@ -0,0 +1,3 @@
Set-StrictMode -Off;

sudo powershell

@ntpeters ntpeters Mar 16, 2024

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PRO-2684, to use the current PowerShell flavor:

sudo $(Get-Process -Id $PID).ProcessName

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants