megathread: sudo should better support PowerShell
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 5.9k
- Forks
- 180
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 2
Description
Currently, sudo only works for elevating an actual executable[^1]. For something like Get-ChildItem (gci) in PowerShell, that's not an executable, it's a cmdlet. We'll need a proper PowerShell module to be able to properly support various PowerShell scenarios.
In the time being, we're working on the sudo.ps1 script to provide a better experience for using sudo from PowerShell.
### Tasks
- [ ] Support for PowerShell cmdlets
- [ ] Support for PowerShell script blocks
- [ ] Support for PowerShell aliases
- [ ] Should `sudo.ps1` pass `-noprofile` to the elevated PowerShell?
- [ ] #6
[^1]: It also supports CMD intrinsics, when run from CMD.exe.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with scripts/sudo.ps1 and review the open task list for PowerShell cmdlets, script blocks, aliases, and profile handling. The issue is a broad megathread, so first determine which scenario is in scope and how elevated PowerShell behavior will be validated; done is not defined for the overall request.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- powershell
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100