Created
April 15, 2021 04:14
-
-
Save zpp0196/4e2a7452e081159e6698f93b5f9803fa to your computer and use it in GitHub Desktop.
ssh 连接 WSL 后添加 Windows 环境变量
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function _add_win_paths() { | |
local _win_paths=( | |
/mnt/c/Windows/ | |
/mnt/c/Windows/system32/ | |
/mnt/c/Windows/System32/WindowsPowerShell/v1.0/ | |
/mnt/d/Program\ Files/Microsoft\ VS\ Code/bin/ | |
/mnt/d/Users/$USER/AppData/Android/Sdk/platform-tools/ | |
) | |
for p in $_win_paths; do | |
export PATH=$PATH:$p | |
done | |
} | |
[[ -n $SSH_TTY ]] && _add_win_paths |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment