microsoft / microsoft/WSL

Extend WSLENV flags to support translating variable name between environments

Open
#5,341 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

The Windows environment is case insensitive while on Linux it is case sensitive. Additionally, some variables names cannot be accessed in the ubiquitous Bash shell. This specifically arises when attempting to map the following variables:

  • Path
  • ProgramFiles
  • ProgramFiles(x86)

This request proposes that an extension flag '>' be introduced to specify a target variable name to populate with the first variable's value. It might be used as follows:
WSLENV=PROGRAMFILES/p:ProgramFiles>PROGRAMFILES/p:PROGRAMFILES(X86)>PROGRAMFILESX86/p:ProgramFiles(x86)>PROGRAMFILESX86/p

The result should be that when entering a Linux shell, the following environment variables are populated:

  • PROGRAMFILES
  • PROGRAMFILESX86

This feature is in response to further issues experienced after resolving #5269.

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

The issue does not identify files, tests, or entry points. Start by locating the WSLENV environment-variable translation path and review how existing flags handle variable names. Done means the proposed > syntax maps the listed Windows names to PROGRAMFILES and PROGRAMFILESX86 in a Linux shell without breaking existing mappings.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.