【问题标题】:Open VS Code project inside shell script在 shell 脚本中打开 VS Code 项目
【发布时间】:2018-10-04 17:19:04
【问题描述】:

我想通过 shell 脚本在 vscode 中打开目录。这是我的脚本:

#!/bin/bash

CODE=`which code`
PATH=$GOPATH/src/github.com/myusername
if [ ${CODE}=="/usr/bin/code" ]; then
    ${CODE} ${PATH}$1;
fi

执行时:

$ bash myscript.sh 项目名

/usr/bin/env: ‘bash’: 没有这样的文件或目录

送什么?

【问题讨论】:

    标签: bash shell visual-studio-code


    【解决方案1】:

    看起来 vscode 还不支持它。

    请参考github上的这个问题https://github.com/Microsoft/vscode/issues/13138

    【讨论】:

      猜你喜欢
      • 2020-10-18
      • 1970-01-01
      • 1970-01-01
      • 2020-11-10
      • 2022-12-17
      • 2020-12-11
      • 1970-01-01
      • 1970-01-01
      • 2019-05-17
      相关资源
      最近更新 更多