Please support `--preserve-env` as an alias for `-E`
Open
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
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 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