簡體   English   中英

Visual Studio 代碼、PowerShell 和 Git Bash

[英]Visual Studio Code, PowerShell, and Git Bash

我一直在嘗試將 VSCode 配置為使用 GitBash 作為集成終端。 但是,無論我嘗試什么,集成終端始終顯示為 PowerShell。 我已禁用 PowerShell,卸載 Windows 終端和 Windows 終端預覽。 這是我的設置。json:

{
    "sync.gist": "16ea877040ee819fae27275ae71be30b",
    "sync.quietSync": true,
    "workbench.iconTheme": "material-icon-theme",
    "editor.minimap.enabled": false,
    "workbench.colorCustomizations": {
        "editorGutter.background": "#30208b",
        "statusBar.background": "#1b5c12",
        "statusBar.debuggingBackground": "#1b5c12",
        "statusBar.noFolderBackground": "#1b5c12",
        "statusBar.border": "#ff0000"
    },
    "python.autoComplete.addBrackets": true,
    "python.dataScience.themeMatplotlibPlots": true,
    "python.linting.pylamaEnabled": true,
    "python.linting.pycodestyleEnabled": true,
    "git.autofetch": true,
    "python.pythonPath": "/usr/bin/python3",
    "code-runner.respectShebang": false,
    "code-runner.fileDirectoryAsCwd": true,
    "code-runner.runInTerminal": true,
    "editor.fontSize": 12,
    "editor.fontFamily": "'Aurulent Sans Mono Regular','Droid Sans Mono', 'monospace', monospace, 'Droid Sans Fallback'",
    "editor.formatOnSave": true,
    "editor.formatOnType": true,
    "editor.formatOnPaste": true,
    "prettier.printWidth": 120,
    "prettier.singleQuote": true,
    "prettier.tabWidth": 4,
    "prettier.jsxSingleQuote": true,
    "prettier.jsxBracketSameLine": true,
    "browser-preview.startUrl": "http://127.0.0.1:8000/",
    "browser-preview.verbose": false,
    "python.linting.pylintArgs": ["--extension-pkg-whitelist=PyQt5"],
    "[python]": {
        "editor.defaultFormatter": "iansan5653.format-python-docstrings"
    },
    "explorer.confirmDragAndDrop": false,
    "explorer.confirmDelete": false,
    "git.enableSmartCommit": true,
    "files.associations": {
        "**/*.html": "html",
        "**/templates/**/*.html": "django-html",
        "**/templates/**/*": "django-txt",
        "**/requirements{/**,*}.{txt,in}": "pip-requirements"
    },
    "terminal.integrated.fontFamily": "'Fira Code Medium'",
    "terminal.integrated.fontSize": 12,
    "terminal.integrated.inheritEnv": true,
    "#terminal.integrated.defaultProfile.osx#": "C:\\Windows\\System32\\cmd.exe",
    "#terminal.integrated.defaultProfile.windows": "C:\\Windows\\System32\\cmd.exe",
    "terminal.integrated.cwd": "C:\\Users\\DawsonSchaffer\\Documents\\Projects",
    "workbench.colorTheme": "Monokai",
    "workbench.editorAssociations": [

        {
            "viewType": "jupyter.notebook.ipynb",
            "filenamePattern": "*.ipynb"
        }
    ],
    "terminal.integrated.profiles.windows": {
        "Git Bash": {
            "source": "Git Bash",
            "path": "C:\\Program Files\\Git\\git-bash.exe",
        }
    },
    "terminal.integrated.defaultProfile.windows": "Git Bash",
    "python.analysis.completeFunctionParens": true,
    "settingsSync.ignoredSettings": [
        "terminal.external.windowsExec"
    ],
    "terminal.explorerKind": "external",
}

任何幫助找到解決方案將不勝感激。

謝謝道森

作為臨時解決方法,您可以使用已棄用的設置:“terminal.integrated.shell.windows”:“C:\Program Files\Git\bin\bash.exe”

我終於使用以下方法讓它工作:

"terminal.integrated.profiles.windows": {
    "Git Bash": {
        "source": "Git Bash",
        "path": "C:\\Program Files\\Git\\git-bash.exe",
        "icon": "C:\\Program Files\\gitbash.png"
    }
},
"terminal.integrated.defaultProfile.windows": "Git Bash",

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM