17 lines
711 B
Bash
17 lines
711 B
Bash
# "[interop] appendWindowsPath=false" in /etc/wsl.conf is setted
|
|
# Dynamically resolve Windows-side program paths (avoids hardcoding usernames)
|
|
if [[ -n "$WSLENV" ]]; then
|
|
_win_user=$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r\n')
|
|
if [[ -n "$_win_user" ]]; then
|
|
_win_home="/mnt/c/Users/$_win_user"
|
|
_vscode_bin="$_win_home/AppData/Local/Programs/Microsoft VS Code/bin"
|
|
_zed_bin="$_win_home/AppData/Local/Programs/Zed/bin"
|
|
[[ -d "$_vscode_bin" ]] && export PATH="$PATH:$_vscode_bin"
|
|
[[ -d "$_zed_bin" ]] && export PATH="$PATH:$_zed_bin"
|
|
fi
|
|
unset _win_user _win_home _vscode_bin _zed_bin
|
|
fi
|
|
|
|
# Language and encoding related
|
|
export LC_ALL=C.UTF-8
|