Powershell
Use the env variable like shell $(pwd)
Set up the environment tempoary.
$env:TEST = "C:\Program Files\Git\bin"
Persistent setup
setx TEST "C:\Program Files\Git\bin"
Note
The setx would set the variable into the user environment variables.
Use env in the PowerShell
echo $env:TEST # "C:\Program Files\Git\bin"
docker run -e TEST=$env:TEST busybox printenv # Contains TEST=C:\Program Files\Git\bin
PowerShell showing git state in the git directory
Using https://github.com/dahlbyk/posh-git
install
Install-Module posh-git -Scope CurrentUser -Force
persist the git state
Add-PoshGitToProfile
Show history in PowerShell List
Set-PSReadLineOption -PredictionSource HistoryAndPlugin -PredictionViewStyle ListView
Edit PowerShell profile
notepad $PROFILE
Use tab to select items from menus
Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete