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
| #消除一个微软的pwsh启动bug,使在开始菜单启动pwsh时会进入home作为工作目录 | |
| if(($PWD).Path -eq "C:\Program Files\WindowsApps\Microsoft.PowerShell_7.5.3.0_x64__8wekyb3d8bbwe" -or | |
| ($PWD).Path -eq "C:\Windows\SystemApps\MicrosoftWindows.Client.CBS_cw5n1h2txyewy" ){ | |
| Set-Location $HOME | |
| } | |
| #挂载WSL virtual network drive file system to PSdrive | |
| #这样做可以使用命令ls wsl: | |
| if($null -eq (get-psdrive wsl -ErrorAction SilentlyContinue).name){new-psdrive -Name "WSL" -PSProvider FileSystem -Root "\\WSL$\Debian"} | |
| #环境设置 | |
| #scoop 方便安装scoop,也可以设置在其他位置比如 C:\users\bakam\onedrive\scoop |