📌  相关文章
📜  从终端打开 vscode - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:50:55.212000             🧑  作者: Mango

代码示例6
# TLDR; copy the following text into your .bashrc then open vscode in any dir
# GIVEN you are using bash in Windows 10
# AND vscode is installed in %LOCALAPPDATA%\Programs\Microsoft VS Code\
# AND there is a subfolder named "bin" that includes a file called code.cmd
# AND you know where to locate and edit your .bashrc
# THEN add the following command to your .bashrc

export PATH=$PATH:%LOCALAPPDATA%\Programs\Microsoft VS Code\bin\

# THEN save and close your .bashrc and exit that terminal session
# THEN open a new session from any windows folder with files you want to edit
# with vscode or navigate to that folder with bash
# THEN run "code ." and it will open the folder in the navigation pane in vscode