microsoft / microsoft/sudo

Please support `--preserve-env` as an alias for `-E`

Open
#21 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Resolution-Fix-Committed Tracking-External
Dominant language
Rust
Stars
5.9k
Forks
180
Avg merge
1d 7h
Merged PRs (30d)
2

Description

In sudo for Linux, the long option name for -E is --preserve-env; please support that as the long version of -E.

--preserve-env additionally accepts an optional list of environment variables, to only preserve those variables rather than the entire environment.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Rust command-line option parsing for -E in the sudo implementation and check how optional arguments are represented. Add --preserve-env as its long-form alias while preserving support for an optional environment-variable list, then run the existing command-line tests or manually compare both forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli, operating-systems
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.