github gerardog/gsudo v1.0.0
gsudo v1.0.0

latest releases: v2.5.1, v2.5.0, v2.4.4...
3 years ago

Features

  • Improved elevation of Bash commands #56: [BREAKING CHANGE] No more need to make additional character escaping (like " to \"). Now most commands can be elevated by prepending 'gsudo'.
    For example:
# Before: (<= v0.7.3)
gsudo Get-Item '""C:\Program Files\""'
$hash = gsudo "(Get-FileHash \""$file\"" -Algorithm $algorithm).Hash"
$hash = gsudo '(Get-FileHash \"C:\My Secret.txt\").Hash'
# After: (only standard pwsh escaping rules needed)
gsudo Get-Item "C:\Program Files\"
$hash = gsudo "(Get-FileHash ""$file"" -Algorithm $algorithm).Hash"
$hash = gsudo '(Get-FileHash "C:\My Secret.txt").Hash'
  • Improved elevation of WSL commands #55: [BREAKING CHANGE] Now prepend gsudo (.exe not required) to elevate WSL native commands (instead of CMD commands), or use gsudo -d {cmd} to elevate CMD commands.

  • Added -d/--direct to bypass the shell wrapper (i.e. powershell/bash/wsl) (#80) and interpret the command to elevate as a Windows / CMD app.
    For example if you do gsudo notepad C:\file.txt from powershell, it will launch another powershell instance to resolve possible PS aliases/commands. (i.e. 'powershell.exe -Command notepad'). But if you add '-d' (gsudo -d notepad) it will expect a CMD/Windows command, so it will launch notepad.exe from the path directly (also a little bit faster).

Fixes

  • gsudo config fails on auto-elevation #62 + #93
  • Microsoft Store Apps fail to elevate if command line has quotes #78
  • Removed Administrator: prefix from console title on de-elevations. #91
  • gsudo launches a 64 bit cmd when ran in a 32-bit cmd #92
  • Bad command prompt on Windows 8.1 #30
  • 'Process exited with code' message now only shown in Debug mode

Don't miss a new gsudo release

NewReleases is sending notifications on new releases.