restore-terminals-vscode icon indicating copy to clipboard operation
restore-terminals-vscode copied to clipboard

problems when vscode has files opened

Open dsl400 opened this issue 2 years ago • 1 comments

split terminal will not function properly when files are opened

will not open all the terminals or will open the terminals in different order / layout

dsl400 avatar Oct 14 '22 15:10 dsl400

This has been driving me crazy and your detail about "when files are opened" was really helpful in understanding the issue, so thanks for that.

Not sure if you are experiencing exactly the same issue as we were, but adding the following to the front of each list of commands in the restoreTerminals config solved it for us:

"[ ! -d '.git' ] && cd .."

This solution assumes only the project root has a .git directory.

For completeness here it is in context:

    "restoreTerminals.terminals": [
      {
        "splitTerminals": [
          {
            "name": "Server:Running",
            "commands": ["[ ! -d '.git' ] && cd ..", "yarn start:server"]
          },

dancras avatar Nov 21 '22 15:11 dancras