microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.19k stars 28.55k forks source link

Can't open the terminal tab after the new upgrade! #156187

Closed muhadel closed 1 year ago

muhadel commented 2 years ago

Issue Type: Bug

Can't open the terminal tab after the new upgrade!

VS Code version: Code 1.69.2 (Universal) (3b889b090b5ad5793f524b5d1d39fda662b96a2a, 2022-07-18T16:12:57.074Z) OS version: Darwin arm64 21.5.0 Restricted Mode: No

System Info |Item|Value| |---|---| |CPUs|Apple M1 Pro (10 x 24)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_renderer: enabled_on
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled| |Load (avg)|5, 4, 4| |Memory (System)|16.00GB (0.08GB free)| |Process Argv|. --crash-reporter-id a275d6b8-6bb1-41c9-902f-6baefd342f4c| |Screen Reader|no| |VM|0%|
Extensions (14) Extension|Author (truncated)|Version ---|---|--- swagger-viewer|Arj|3.1.2 simple-react-snippets|bur|1.2.6 bracket-pair-colorizer-2|Coe|0.2.4 githistory|don|0.6.19 es7-react-js-snippets|dsz|4.4.3 gitlens|eam|12.1.2 prettier-vscode|esb|9.5.0 go|gol|0.35.1 beautify|Hoo|1.5.0 vscode-docker|ms-|1.22.1 vsliveshare|ms-|1.0.5641 material-icon-theme|PKi|4.19.0 vscode-yaml|red|1.9.1 code-spell-checker|str|2.3.1
tjx666 commented 1 year ago

Same here:

Version: 1.72.0-insider (Universal)
Commit: 5cecbf4746a7b95dedaf9fc4534b9786b9a30ace
Date: 2022-09-09T16:24:20.520Z
Electron: 19.0.12
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin x64 21.6.0
Sandboxed: Yes

https://user-images.githubusercontent.com/41773861/189538022-a70186f8-ae1b-4366-990b-a2fce74a3899.mov

tjx666 commented 1 year ago

Reproduce steps:

  1. open VSCode integrated terminal (If you can't, please restart VSCode first)
  2. git clone any project
  3. code-insiders -r cloned-project
  4. try to open integrated terminal by cmd + J
  5. but you can't open terminal
  6. restart VSCode, now you can open

@Tyriar @meganrogge

https://user-images.githubusercontent.com/41773861/189538261-26390cf7-35af-45fb-8a46-7f2819e3a44c.mov

meganrogge commented 1 year ago

Can you share your settings.json file and also do a trace log while creating a terminal? https://github.com/microsoft/vscode/wiki/Terminal-Issues#enabling-trace-logging /label info-needed terminal

In the meantime and after getting that trace log, this will probably be fixed by "terminal.integrated.shellIntegration.enabled": false

tjx666 commented 1 year ago

@meganrogge

log file:

rendererLog.log

tjx666 commented 1 year ago

aettings.json

{
    "debug.console.fontFamily": "'MesloLGS NF', 'Monaco'",
    "debug.javascript.codelens.npmScripts": "never",
    "diffEditor.ignoreTrimWhitespace": false,
    "emmet.useInlineCompletions": true,
    "explorer.confirmDelete": false,
    "explorer.copyRelativePathSeparator": "/",
    "files.autoSave": "afterDelay",
    "files.exclude": {
        "**/.git": true
    },
    "git.mergeEditor": false,
    "files.maxMemoryForLargeFilesMB": 8192,
    "git.autofetch": true,
    // "git.branchProtection": ["master", "main"],
    "git.closeDiffOnOperation": true,
    "git.confirmSync": false,
    "git.enableSmartCommit": true,
    "git.timeline.showUncommitted": true,
    "json.maxItemsComputed": 8888,
    "scm.inputFontFamily": "editor",
    "search.useIgnoreFiles": true,
    "security.workspace.trust.untrustedFiles": "open",
    "settingsSync.ignoredSettings": ["explorer.fileNesting.patterns"],
    "telemetry.telemetryLevel": "off",
    "terminal.integrated.shellIntegration.enabled": true,
    "terminal.integrated.smoothScrolling": false,
    "testExplorer.useNativeTesting": true,
    "translation.proxy-url": "http://127.0.0.1:7890",
    "translation.target-language": "zh-CN",
    "window.title": "${activeEditorMedium}${separator}${rootName}",
    "editor.experimental.pasteActions.enabled": true,
    "markdown.experimental.editor.pasteLinks.enabled": true,
    "markdown.experimental.validate.enabled": true,
    "markdown.experimental.validate.referenceLinks.enabled": "ignore",
    "http.proxy": "http://127.0.0.1:7890",
    "modifyFileWarning.includedFileGlobs": ["**/node_modules/**/*"],
    "modifyFileWarning.enableNvmrcCheck": true,
    "editor.acceptSuggestionOnCommitCharacter": false,
    "editor.snippets.codeActions.enabled": false,
    // "workbench.experimental.settingsProfiles.enabled": true,
    // "typescript.suggest.completeFunctionCalls": true,
    "mergeEditor.diffAlgorithm": "experimental",
    // "editor.stickyScroll.enabled": true,
    // "editor.stickyScroll.maxLineCount": 3,
    "markdown.experimental.updateLinksOnFileMove.enabled": "prompt",
    // "files.simpleDialog.enable": true,

    // editor
    "editor.accessibilitySupport": "off",
    "editor.wordSeparators": "`~!@#$%^&*()-=+[{]}\\|;::'\",.<>/?,。‘’“”;()【】{}《》「」",
    "editor.wordBasedSuggestionsMode": "allDocuments",
    // https://github.com/microsoft/vscode/issues/136260
    // not work when enable autoSave
    "editor.codeActionsOnSave": {
        "source.addMissingImports": true,
        "source.fixAll.eslint": true,
        "source.fixAll.stylelint": true,
        "source.fixAll": false,
        "source.organizeImports.sortImport": true
    },
    "editor.formatOnSave": true,
    "editor.cursorBlinking": "smooth",
    "editor.cursorSmoothCaretAnimation": true,
    "editor.foldingHighlight": false,
    "editor.fontFamily": "'Fira Code'",
    "editor.fontSize": 12,
    "editor.inlineSuggest.enabled": true,
    "editor.lightbulb.enabled": false,
    "editor.linkedEditing": true,
    "editor.minimap.enabled": false,
    "editor.quickSuggestions": {
        "strings": true,
        "comments": true,
        "other": true
    },
    "editor.smoothScrolling": true,
    "editor.stickyTabStops": true,
    "editor.suggest.preview": true,
    "editor.suggest.shareSuggestSelections": true,
    "editor.suggest.snippetsPreventQuickSuggestions": false,
    "editor.suggestSelection": "first",
    "editor.unfoldOnClickAfterEndOfLine": true,
    "editor.unicodeHighlight.allowedLocales": {
        "zh-hans": true,
        "zh-hant": true
    },
    "editor.wordWrap": "off",
    "editor.semanticTokenColorCustomizations": {
        "[One Dark Pro]": {
            "enabled": true,
            "rules": {
                "variable": {
                    "foreground": "#e5c07b"
                },
                "variable.mutable": {
                    "foreground": "#e06c75",
                    "underline": false
                }
            }
        }
    },

    // workbench
    "workbench.editor.highlightModifiedTabs": true,
    "workbench.editor.historyBasedLanguageDetection": true,
    "workbench.editor.limit.enabled": true,
    "workbench.editor.limit.perEditorGroup": true,
    "workbench.editor.limit.value": 8,
    "workbench.editor.scrollToSwitchTabs": true,
    "workbench.iconTheme": "vscode-icons",
    "workbench.list.smoothScrolling": true,
    "workbench.localHistory.enabled": false,
    "workbench.tree.indent": 14,

    // terminal
    "terminal.integrated.cursorBlinking": true,
    "terminal.integrated.defaultProfile.osx": "zsh",
    "terminal.integrated.enableBell": true,
    "terminal.integrated.fontFamily": "'MesloLGS NF', 'Monaco'",
    "terminal.integrated.fontSize": 12,
    "terminal.integrated.gpuAcceleration": "on",

    // language
    "html.autoClosingTags": true,
    "javascript.preferences.quoteStyle": "single",
    "javascript.updateImportsOnFileMove.enabled": "always",
    "typescript.preferences.quoteStyle": "single",
    "typescript.preferences.useAliasesForRenames": false,
    "typescript.tsserver.maxTsServerMemory": 8192,
    "typescript.updateImportsOnFileMove.enabled": "always",
    "typescript.suggest.jsdoc.generateReturns": false,
    "files.associations": {
        ".env": "env",
        "*.jsxinc": "javascript"
    },
    "vsicons.associations.files": [
        {
            "icon": "config",
            "extensions": ["env"],
            "format": "svg"
        }
    ],
    "[javascript][javascriptreact][typescript][typescriptreact][vue][json][jsonc]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "[html][css][less][scss][markdown][xml][yaml][svg]": {
        "editor.defaultFormatter": "esbenp.prettier-vscode"
    },
    "json.schemas": [
        // {
        //     "fileMatch": ["src/manifest.json"],
        //     "url": "https://json.schemastore.org/chrome-manifest.json"
        // },
        {
            "fileMatch": ["*/turbo.json"],
            "url": "https://turborepo.org/schema.json"
        }
    ],
    // "[markdown]": {
    //     "editor.wordWrap": "off"
    // },

    // extensions
    "adobeExtensionDevtools.aeAppPath": "/Applications/Adobe After Effects 2021/Adobe After Effects 2021.app",
    "adobeExtensionDevtools.ps.descriptorInfoInsertTimeStr": false,
    "errorLens.enabledDiagnosticLevels": ["error", "warning"],
    "extendscript.scriptEvaluation.showResultMessages": false,
    "livePreview.openPreviewTarget": "External Browser",
    "CSSNavigation.enableIdAndClassNameCompletion": false,
    "code-runner.executorMap": {
        "typescript": "ts-node",
        "cpp": "cd $dir && g++ $fileName -std=c++2a -Wall -o $fileNameWithoutExt && ./$fileNameWithoutExt",
        "dart": "/Users/yutengjing/apps/flutter/latest/bin/dart run --enable-asserts $fullFileName",
        "python": "python3 $fullFileName"
    },
    "code-runner.executorMapByFileExtension": {
        ".scpt": "osascript $fullFileName"
    },
    "code-runner.showRunIconInEditorTitleMenu": false,
    "code-runner.terminalRoot": "/",
    "colorInfo.languages": [
        {
            "selector": "css",
            "colors": "css"
        },
        {
            "selector": "less",
            "colors": "css"
        },
        {
            "selector": "scss",
            "colors": "css"
        },
        {
            "selector": "vue",
            "colors": "css"
        }
    ],
    "colorize.languages": ["css", "scss", "less", "xml", "svg"],
    "colorize.enable_search_variables": false,
    "livePreview.portNumber": 8888,
    "gitHistory.showEditorTitleMenuBarIcons": false,
    "gitlens.codeLens.scopes": ["document"],
    "gitlens.currentLine.enabled": false,
    "gitlens.plusFeatures.enabled": false,
    "gitlens.statusBar.format": "${author, }${agoOrDate}${' via 'pullRequest}${ • message|50?}",
    "markdownlint.config": {
        "default": true,
        "MD033": false,
        "MD041": false,
        "MD024": false
    },
    "markdown-preview-github-styles.colorTheme": "light",
    "mochaExplorer.autoload": "onStart",
    "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
    // "intellicodeCompletions.language.javascript": true,
    // "intellicodeCompletions.language.typescript": true,
    "oneDarkPro.markdownStyle": false,
    "openInExternalApp.openMapper": [
        {
            "apps": "Adobe Photoshop 2022",
            "extensionName": ["jsxbin", "jsx"]
        }
    ],
    "path-autocomplete.extensionOnImport": true,
    "path-autocomplete.ignoredFilesPattern": "*.md",
    "path-autocomplete.excludedItems": {
        "**/*.+(ts|tsx)": {
            "when": "**/*.+(ts|tsx)",
            "context": "import|require"
        },
        "**": {
            "when": "**/*.+(ts|tsx|js|jsx)",
            "context": "import|require",
            "isDir": true
        }
    },
    "prettier.documentSelectors": ["**/*.svg"],
    "prettier.tabWidth": 4,
    "redhat.telemetry.enabled": false,
    "ScriptingListener.logFileEncoding": "gbk",
    "svg.preview.mode": "svg",
    "stylelint.validate": [
        "css",
        "less",
        "scss"
        // "javascriptreact",
        // "typescriptreact",
    ],
    "inlineFold.regex": "(class|className)=[`'{\"]([^`'\"}]+)[`'\"}]",
    "template-string-converter.validLanguages": [
        "vue",
        "typescript",
        "javascript",
        "typescriptreact",
        "javascriptreact"
    ],
    "template-string-converter.autoRemoveTemplateString": true,
    "template-string-converter.quoteType": "single",
    "better-comments.tags": [
        {
            "tag": "!:",
            "color": "#FF2D00",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "?:",
            "color": "#3498DB",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "TODO:",
            "color": "#FFBD2A",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "FIXME:",
            "color": "#F06292",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        },
        {
            "tag": "NOTE:",
            "color": "#FFFF00",
            "strikethrough": false,
            "underline": false,
            "backgroundColor": "transparent",
            "bold": false,
            "italic": false
        }
    ],
    // https://github.com/Gruntfuggly/todo-tree/issues/255#issuecomment-574279033
    "todo-tree.regex.regex": "(?:(?://|#|<!--|;|/\\*\\*?|\\*|(-|\\d+.))\\s*($TAGS))",
    "todo-tree.filtering.useBuiltInExcludes": "file and search excludes",
    "todo-tree.general.tags": ["TODO:", "FIXME:", "NOTE:", "[ ]", "[x]"],
    "todo-tree.highlights.customHighlight": {
        "TODO:": {
            "foreground": "#FFFFFF",
            "background": "#FFBD2A",
            "iconColour": "#FFBD2A"
        },
        "FIXME:": {
            "foreground": "#FFFFFF",
            "background": "#F06292",
            "icon": "flame",
            "iconColour": "#F06292"
        },
        "NOTE:": {
            "foreground": "#808080",
            "background": "#FFFF00",
            "icon": "alert",
            "iconColour": "#FFFF00"
        }
    },
    "todo-tree.highlights.defaultHighlight": {
        "gutterIcon": false,
        "rulerLane": "none"
    },
    "todo-tree.ripgrep.ripgrep": "/usr/local/bin/rg",
    "todo-tree.tree.autoRefresh": false,
    "todo-tree.tree.scanAtStartup": false,
    "tsImportSorter.configuration.autoFormat": "off",
    "tsImportSorter.configuration.groupRules": [
        ["node:"],
        ["^[@][^/]", {}],
        [
            "^@(/|$)",
            "^actions?(/|$)",
            "^apis?(/|$)",
            "^assets(/|$)",
            "^components?(/|$)",
            "^helpers?(/|$)",
            "^pages?(/|$)",
            "^sagas?(/|$)",
            "^selectors?(/|$)",
            "^reducers?(/|$)",
            "^typings?(/|$)",
            "^utils(/|$)"
        ],
        {
            "flags": "named",
            "regex": "^[.]"
        },
        [
            {
                "flags": "scripts"
            },
            {
                "flags": "scripts",
                "regex": "[.]((css)|(less)|(scss))$"
            }
        ]
    ],
    "tsImportSorter.configuration.wrappingStyle": "prettier",
    "vsicons.associations.folders": [
        {
            "icon": "test",
            "extensions": ["test-workspace"],
            "format": "svg"
        },
        {
            "icon": "www",
            "extensions": ["web"],
            "format": "svg"
        },
        {
            "icon": "js",
            "extensions": ["JSX"],
            "format": "svg"
        },
        {
            "icon": "asset",
            "extensions": ["resource"],
            "format": "svg"
        },
        {
            "icon": "config",
            "extensions": ["CSXS"],
            "format": "svg"
        },
        {
            "icon": "temp",
            "extensions": ["playground", "draft"],
            "format": "svg"
        },
        {
            "icon": "redux",
            "extensions": ["slices"],
            "format": "svg"
        }
    ],

    // long config
    "cSpell.language": "en-US",
    "cSpell.checkLimit": 888,
    "cSpell.dictionaries": ["myDict"],
    "cSpell.ignorePaths": [
        "node_modules",
        "vscode-extension",
        ".git/objects",
        ".idea",
        ".dart_tool",
        "**/*.lock",
        "**/*.log",
        "package-lock.json",
        "**/pnpm-lock.yaml"
    ],
    "cSpell.enableFiletypes": [
        "env",
        "gitignore",
        "hosts",
        "makefile",
        "properties",
        "shellscript",
        "sql",
        "toml",
        "xml"
    ],
    "cSpell.languageSettings": [
        {
            "languageId": "dart",
            "patterns": [
                {
                    "name": "Dart-RegExp-String",
                    "pattern": "/\\br(['\"]).*?\\1/g"
                }
            ],
            "ignoreRegExpList": ["Dart-RegExp-String"]
        }
    ],
    "cSpell.dictionaryDefinitions": [
        {
            "name": "myDict",
            "path": "/Users/yutengjing/.my-spell-check-dict.txt"
        }
    ],
    "cSpell.userWords": ["argb"],

    // file nesting
    "explorer.fileNesting.enabled": true,
    "explorer.fileNesting.expand": false,
    "explorer.fileNesting.patterns": {
        "//": "Last update at 9/12/2022, 2:49:38 PM",
        "*.asax": "$(capture).*.cs, $(capture).*.vb",
        "*.ascx": "$(capture).*.cs, $(capture).*.vb",
        "*.ashx": "$(capture).*.cs, $(capture).*.vb",
        "*.aspx": "$(capture).*.cs, $(capture).*.vb",
        "*.bloc.dart": "$(capture).event.dart, $(capture).state.dart",
        "*.c": "$(capture).h",
        "*.cc": "$(capture).hpp, $(capture).h, $(capture).hxx",
        "*.component.ts": "$(capture).component.html, $(capture).component.spec.ts, $(capture).component.css, $(capture).component.scss, $(capture).component.sass, $(capture).component.less",
        "*.cpp": "$(capture).hpp, $(capture).h, $(capture).hxx",
        "*.cs": "$(capture).*.cs",
        "*.cshtml": "$(capture).cshtml.cs",
        "*.csproj": "*.config, *proj.user, appsettings.*, bundleconfig.json",
        "*.css": "$(capture).css.map, $(capture).*.css",
        "*.cxx": "$(capture).hpp, $(capture).h, $(capture).hxx",
        "*.dart": "$(capture).freezed.dart, $(capture).g.dart",
        "*.ex": "$(capture).html.eex, $(capture).html.heex, $(capture).html.leex",
        "*.java": "$(capture).class",
        "*.js": "$(capture).js.map, $(capture).*.js, $(capture)_*.js",
        "*.jsx": "$(capture).js, $(capture).*.jsx, $(capture)_*.js, $(capture)_*.jsx",
        "*.master": "$(capture).*.cs, $(capture).*.vb",
        "*.module.ts": "$(capture).resolver.ts, $(capture).controller.ts, $(capture).service.ts",
        "*.pubxml": "$(capture).pubxml.user",
        "*.resx": "$(capture).*.resx, $(capture).designer.cs, $(capture).designer.vb",
        "*.tex": "$(capture).acn, $(capture).acr, $(capture).alg, $(capture).aux, $(capture).bbl, $(capture).blg, $(capture).fdb_latexmk, $(capture).fls, $(capture).glg, $(capture).glo, $(capture).gls, $(capture).idx, $(capture).ind, $(capture).ist, $(capture).lof, $(capture).log, $(capture).lot, $(capture).out, $(capture).pdf, $(capture).synctex.gz, $(capture).toc, $(capture).xdv",
        "*.ts": "$(capture).js, $(capture).d.ts.map, $(capture).*.ts, $(capture)_*.js, $(capture)_*.ts",
        "*.tsx": "$(capture).ts, $(capture).*.tsx, $(capture)_*.ts, $(capture)_*.tsx",
        "*.vbproj": "*.config, *proj.user, appsettings.*, bundleconfig.json",
        "*.vue": "$(capture).*.ts, $(capture).*.js, $(capture).story.vue",
        "*.xaml": "$(capture).xaml.cs",
        "+layout.svelte": "+layout.ts,+layout.ts,+layout.js,+layout.server.ts,+layout.server.js",
        "+page.svelte": "+page.server.ts,+page.server.js,+page.ts,+page.js ",
        ".clang-tidy": ".clang-format, .clangd, compile_commands.json",
        ".env": "*.env, .env.*, .envrc, env.d.ts",
        ".gitignore": ".gitattributes, .gitmodules, .gitmessage, .mailmap, .git-blame*",
        ".project": ".classpath",
        "BUILD.bazel": "*.bzl, *.bazel, *.bazelrc, bazel.rc, .bazelignore, .bazelproject, WORKSPACE",
        "CMakeLists.txt": "*.cmake, *.cmake.in, .cmake-format.yaml, CMakePresets.json",
        "I*.cs": "$(capture).cs",
        "artisan": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, server.php, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, webpack.mix.js, windi.config.*",
        "astro.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "cargo.toml": ".clippy.toml, .rustfmt.toml, cargo.lock, clippy.toml, cross.toml, rust-toolchain.toml, rustfmt.toml",
        "composer.json": ".php*.cache, composer.lock, phpunit.xml*, psalm*.xml",
        "default.nix": "shell.nix",
        "deno.json*": "*.env, .env.*, .envrc, api-extractor.json, env.d.ts, import-map.json, import_map.json, jsconfig.*, tsconfig.*, tsdoc.*",
        "dockerfile": ".dockerignore, docker-compose.*, dockerfile*",
        "flake.nix": "flake.lock",
        "gatsby-config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, gatsby-browser.*, gatsby-node.*, gatsby-ssr.*, gatsby-transformer.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "gemfile": ".ruby-version, gemfile.lock",
        "go.mod": ".air*, go.sum",
        "mix.exs": ".credo.exs, .dialyzer_ignore.exs, .formatter.exs, .iex.exs, .tool-versions, mix.lock",
        "next.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, next-env.d.ts, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "nuxt.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "package.json": ".browserslist*, .circleci*, .codecov, .commitlint*, .cz-config.js, .czrc, .dlint.json, .dprint.json, .editorconfig, .eslint*, .firebase*, .flowconfig, .github*, .gitlab*, .gitpod*, .huskyrc*, .jslint*, .lighthouserc.*, .lintstagedrc*, .markdownlint*, .mocha*, .node-version, .nodemon*, .npm*, .nvmrc, .pm2*, .pnp.*, .pnpm*, .prettier*, .releaserc*, .sentry*, .stackblitz*, .styleci*, .stylelint*, .tazerc*, .textlint*, .tool-versions, .travis*, .versionrc*, .vscode*, .watchman*, .xo-config*, .yamllint*, .yarnrc*, Procfile, api-extractor.json, apollo.config.*, appveyor*, ava.config.*, azure-pipelines*, bower.json, build.config.*, commitlint*, crowdin*, cypress.*, dangerfile*, dlint.json, dprint.json, firebase.json, grunt*, gulp*, histoire.config.*, jasmine.*, jenkins*, jest.config.*, jsconfig.*, karma*, lerna*, lighthouserc.*, lint-staged*, nest-cli.*, netlify*, nodemon*, nx.*, package-lock.json, package.nls*.json, phpcs.xml, playwright.config.*, pm2.*, pnpm*, prettier*, pullapprove*, puppeteer.config.*, pyrightconfig.json, release-tasks.sh, renovate*, rollup.config.*, stylelint*, tsconfig.*, tsdoc.*, tslint*, tsup.config.*, turbo*, typedoc*, unlighthouse*, vercel*, vetur.config.*, vitest.config.*, webpack*, workspace.json, xo.config.*, yarn*",
        "pubspec.yaml": ".metadata, .packages, all_lint_rules.yaml, analysis_options.yaml, build.yaml, pubspec.lock",
        "pyproject.toml": ".pdm.toml, pdm.lock, pyproject.toml",
        "quasar.conf.js": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, quasar.extensions.json, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "readme*": "authors, backers*, changelog*, citation*, code_of_conduct*, codeowners, contributing*, contributors, copying, credits, governance.md, history.md, license*, maintainers, readme*, security.md, sponsors*",
        "remix.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, remix.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "rush.json": ".browserslist*, .circleci*, .codecov, .commitlint*, .cz-config.js, .czrc, .dlint.json, .dprint.json, .editorconfig, .eslint*, .firebase*, .flowconfig, .github*, .gitlab*, .gitpod*, .huskyrc*, .jslint*, .lighthouserc.*, .lintstagedrc*, .markdownlint*, .mocha*, .node-version, .nodemon*, .npm*, .nvmrc, .pm2*, .pnp.*, .pnpm*, .prettier*, .releaserc*, .sentry*, .stackblitz*, .styleci*, .stylelint*, .tazerc*, .textlint*, .tool-versions, .travis*, .versionrc*, .vscode*, .watchman*, .xo-config*, .yamllint*, .yarnrc*, Procfile, api-extractor.json, apollo.config.*, appveyor*, ava.config.*, azure-pipelines*, bower.json, build.config.*, commitlint*, crowdin*, cypress.*, dangerfile*, dlint.json, dprint.json, firebase.json, grunt*, gulp*, histoire.config.*, jasmine.*, jenkins*, jest.config.*, jsconfig.*, karma*, lerna*, lighthouserc.*, lint-staged*, nest-cli.*, netlify*, nodemon*, nx.*, package-lock.json, package.nls*.json, phpcs.xml, playwright.config.*, pm2.*, pnpm*, prettier*, pullapprove*, puppeteer.config.*, pyrightconfig.json, release-tasks.sh, renovate*, rollup.config.*, stylelint*, tsconfig.*, tsdoc.*, tslint*, tsup.config.*, turbo*, typedoc*, unlighthouse*, vercel*, vetur.config.*, vitest.config.*, webpack*, workspace.json, xo.config.*, yarn*",
        "shims.d.ts": "*.d.ts",
        "svelte.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, mdsvex.config.js, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "vite.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*",
        "vue.config.*": "*.env, .babelrc*, .codecov, .cssnanorc*, .env.*, .envrc, .htmlnanorc*, .lighthouserc.*, .mocha*, .postcssrc*, .terserrc*, api-extractor.json, ava.config.*, babel.config.*, contentlayer.config.*, cssnano.config.*, cypress.*, env.d.ts, formkit.config.*, formulate.config.*, histoire.config.*, htmlnanorc.*, jasmine.*, jest.config.*, jsconfig.*, karma*, lighthouserc.*, playwright.config.*, postcss.config.*, puppeteer.config.*, svgo.config.*, tailwind.config.*, tsconfig.*, tsdoc.*, unocss.config.*, vitest.config.*, webpack.config.*, windi.config.*"
    },
    "window.commandCenter": true,
    "workbench.layoutControl.enabled": false,
    "workbench.colorTheme": "Dracula",
    "window.zoomLevel": 1
}
tjx666 commented 1 year ago

This issue indeed can be fixed by disable shell integerated

meganrogge commented 1 year ago

thanks for the info! could you pls get the logs for the ptyhost?

tjx666 commented 1 year ago

the log for window:

[2022-09-14 00:32:19.931] [renderer1] [info] Electron sandbox mode is enabled!
[2022-09-14 00:32:19.977] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-vsliveshare.vsliveshare' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:32:19.977] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-dotnettools.dotnet-interactive-vscode' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:32:19.977] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'github.vscode-pull-request-github' wants API proposal 'badges' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:32:19.978] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-toolsai.jupyter' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:32:19.978] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-toolsai.vscode-jupyter-powertoys' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:32:20.066] [renderer1] [warning] Workbench contribution WalkThroughSnippetContentProvider blocked restore phase by 16ms.
[2022-09-14 00:32:20.960] [renderer1] [warning] [redhat.vscode-yaml]: Cannot register 'redhat.telemetry.enabled'. This property is already registered.
[2022-09-14 00:32:21.070] [renderer1] [info] [eamodio.gitlens-insiders]: Command `gitlens.copyAutolinkUrl` appears multiple times in the `commands` section.
[2022-09-14 00:32:21.261] [renderer1] [info] Creating lazy extension host: contains 2 extension(s): haberdashPI.vscode-select-by-indent,pomdtr.fileutils.
[2022-09-14 00:32:21.616] [renderer1] [warning] No search provider registered for scheme: file, waiting
[2022-09-14 00:33:04.941] [renderer1] [info] Electron sandbox mode is enabled!
[2022-09-14 00:33:04.972] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-vsliveshare.vsliveshare' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:33:04.972] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-dotnettools.dotnet-interactive-vscode' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:33:04.972] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'github.vscode-pull-request-github' wants API proposal 'badges' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:33:04.972] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-toolsai.jupyter' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:33:04.973] [renderer1] [warning] Via 'product.json#extensionEnabledApiProposals' extension 'ms-toolsai.vscode-jupyter-powertoys' wants API proposal 'notebookWorkspaceEdit' but that proposal DOES NOT EXIST. Likely, the proposal has been finalized (check 'vscode.d.ts') or was abandoned.
[2022-09-14 00:33:05.052] [renderer1] [warning] Workbench contribution WalkThroughSnippetContentProvider blocked restore phase by 15ms.
[2022-09-14 00:33:05.631] [renderer1] [warning] [redhat.vscode-yaml]: Cannot register 'redhat.telemetry.enabled'. This property is already registered.
[2022-09-14 00:33:05.738] [renderer1] [info] [eamodio.gitlens-insiders]: Command `gitlens.copyAutolinkUrl` appears multiple times in the `commands` section.
[2022-09-14 00:33:05.843] [renderer1] [info] Creating lazy extension host: contains 2 extension(s): haberdashPI.vscode-select-by-indent,pomdtr.fileutils.
[2022-09-14 00:33:05.989] [renderer1] [warning] No search provider registered for scheme: file, waiting

the log for ptyhost log is empty:

https://user-images.githubusercontent.com/41773861/189957622-f6f197eb-9822-4c6c-8afe-bc2db003318c.mov

meganrogge commented 1 year ago

thanks for that info - could you pls share the contents of your .zprofile?

tjx666 commented 1 year ago

thanks for that info - could you pls share the contents of your .zprofile?

You mean .zshrc ?

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
[[ -f ~/.cache/p10k-instant-prompt-yutengjing.zsh ]] && source ~/.cache/p10k-instant-prompt-yutengjing.zsh

export PATH="/usr/local/sbin:$PATH"

# zsh-syntax-highlighting
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern cursor regexp root line)

# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH

# Path to your oh-my-zsh installation.
export ZSH="/Users/yutengjing/.oh-my-zsh"

# Set name f the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
# ZSH_THEME="random"
ZSH_THEME="powerlevel10k/powerlevel10k"

# Set list of themes to pick from when loading at random
# Setting this variable when ZSH_THEME=random will cause zsh to load
# a theme from this variable instead of looking in $ZSH/themes/
# If set to an empty array, this variable will have no effect.
# ZSH_THEME_RANDOM_CANDIDATES=( "robbyrussell" "agnoster" )

# Uncomment the following line to use case-sensitive completion.
# CASE_SENSITIVE="true"

# Uncomment the following line to use hyphen-insensitive completion.
# Case-sensitive completion must be off. _ and - will be interchangeable.
# HYPHEN_INSENSITIVE="true"

# Uncomment the following line to disable bi-weekly auto-update checks.
# DISABLE_AUTO_UPDATE="true"

# Uncomment the following line to automatically update without prompting.
# DISABLE_UPDATE_PROMPT="true"

# Uncomment the following line to change how often to auto-update (in days).
# export UPDATE_ZSH_DAYS=13

# Uncomment the following line if pasting URLs and other text is messed up.
# DISABLE_MAGIC_FUNCTIONS=true

# Uncomment the following line to disable colors in ls.
# DISABLE_LS_COLORS="true"

# Uncomment the following line to disable auto-setting terminal title.
# DISABLE_AUTO_TITLE="true"

# Uncomment the following line to enable command auto-correction.
# ENABLE_CORRECTION="true"

# Uncomment the following line to display red dots whilst waiting for completion.
# COMPLETION_WAITING_DOTS="true"

# Uncomment the following line if you want to disable marking untracked files
# under VCS as dirty. This makes repository status check for large repositories
# much, much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"

# Uncomment the following line if you want to change the command execution time
# stamp shown in the history command output.
# You can set one of the optional three formats:
# "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# or set a custom format using the strftime function format specifications,
# see 'man strftime' for details.
HIST_STAMPS="yyyy-mm-dd"

# Would you like to use another custom folder than $ZSH/custom?
# ZSH_CUSTOM=/path/to/new-custom-folder

# Which plugins would you like to load?
# Standard plugins can be found in $ZSH/plugins/
# Custom plugins may be added to $ZSH_CUSTOM/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
# Add wisely, as too many plugins slow down shell startup.
# official
plugins+=(
  alias-finder
  command-not-found
  extract
  gh
  hitokoto
  rust
  safe-paste
  sudo
  themes
  z
)

# unofficial
plugins+=(
  zsh-npm-scripts-autocomplete
  zsh-autosuggestions
  zsh-syntax-highlighting
)

# load plugins in none vscode integrated terminal
if [[ "$TERM_PROGRAM" != "vscode" ]]; then
  plugins+=(
    git-auto-fetch
  )
fi

source $ZSH/oh-my-zsh.sh

# User configuration

# export MANPATH="/usr/local/man:$MANPATH"

# You may need to manually set your language environment
export LANG=en_US.UTF-8

# Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
#   export EDITOR='vim'
# else
#   export EDITOR='mvim'
# fi

# Compilation flags
# export ARCHFLAGS="-arch x86_64"

# Set personal aliases, overriding those provided by oh-my-zsh libs,
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
# For a full list of active aliases, run `alias`.
#
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"

# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh

# 将下划线和中划线视为和普通字母一样作为一个单词的一部分
WORDCHARS+='_-'

# bindkey
bindkey '^[SE' autosuggest-execute

# language
export LC_ALL=en_US.UTF-8
export LC_CTYPE=en_US.UTF-8

# nvm
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"                   # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion

# call nvm use automatically whenever you enter a directory that contains an .nvmrc file with a string telling nvm which node to use
# autoload -U add-zsh-hook
# load-nvmrc() {
#   local node_version="$(nvm version)"
#   local nvmrc_path="$(nvm_find_nvmrc)"

#   if [ -n "$nvmrc_path" ]; then
#     local nvmrc_node_version=$(nvm version "$(cat "${nvmrc_path}")")

#     if [ "$nvmrc_node_version" = "N/A" ]; then
#       nvm install
#     elif [ "$nvmrc_node_version" != "$node_version" ]; then
#       nvm use --silent
#     fi
#   elif [ "$node_version" != "$(nvm version default)" ]; then
#     echo "Reverting to nvm default version"
#     nvm use default --silent
#   fi
# }
# add-zsh-hook chpwd load-nvmrc
# load-nvmrc

# fzf
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# iterm2
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"

# gvm
[[ -s "/Users/yutengjing/.gvm/scripts/gvm" ]] && source "/Users/yutengjing/.gvm/scripts/gvm"

# pnpm completion
[[ -f ~/.config/tabtab/zsh/__tabtab.zsh ]] && . ~/.config/tabtab/zsh/__tabtab.zsh || true

# ------------------------ proxy -----------------------------
function proxyWithoutPrompt() {
  export http_proxy="http://127.0.0.1:7890"
  export https_proxy="http://127.0.0.1:7890"
  export all_proxy="socks5://127.0.0.1:7890"
  export no_proxy="localhost,127.0.0.1"

  export HTTP_PROXY="http://127.0.0.1:7890"
  export HTTPS_PROXY="http://127.0.0.1:7890"
  export ALL_PROXY="socks5://127.0.0.1:7890"
}

function proxy() {
  proxyWithoutPrompt
  echo "HTTP Proxy on"
}

function noproxy() {
  unset http_proxy
  unset https_proxy
  unset all_proxy
  unset no_proxy
  unset HTTP_PROXY
  unset HTTPS_PROXY
  unset ALL_PROXY
  unset NO_PROXY
  echo "HTTP Proxy off"
}

function node-docs() {
  local section=${1:-all}
  open_command "https://nodejs.org/docs/$(node --version)/api/$section.html"
}

function update-nvm() {
  curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
}

function ls-path() {
  echo -e ${PATH//:/\\n}
}

function file-count() {
  ls $1 | wc -l
}

function uninstall-vscode-insiders() {
  rm -rv ~/Library/Preferences/com.microsoft.VSCodeInsiders.plist 2>/dev/null
  rm -rv ~/Library/Caches/com.microsoft.VSCodeInsiders 2>/dev/null
  rm -rv ~/Library/Caches/com.microsoft.VSCodeInsiders.ShipIt 2>/dev/null
  rm -rv ~/Library/Application\ Support/Code\ -\ Insiders 2>/dev/null
  rm -rv ~/Library/Saved\ Application\ State/com.microsoft.VSCodeInsiders.savedState/ 2>/dev/null
  rm -rv ~/.vscode-insiders/ 2>/dev/null
}

function uninstall-vscode() {
  rm -rv ~/Library/Preferences/com.microsoft.VSCode.plist 2>/dev/null
  rm -rv ~/Library/Caches/com.microsoft.VSCode 2>/dev/null
  rm -rv ~/Library/Caches/com.microsoft.VSCode.ShipIt 2>/dev/null
  rm -rv ~/Library/Application\ Support/Code 2>/dev/null
  rm -rv ~/Library/Saved\ Application\ State/com.microsoft.VSCode.savedState/ 2>/dev/null
  rm -rv ~/.vscode/ 2>/dev/null
}

function ver() {
  echo "MacOS: ${$(sw_vers | sed '2q;d'):16}
VSCode: $(code-insiders --version | head -n 1)
Typescript: ${$(tsc --version):8}
Node: $(node --version)
Npm: $(npm --version)
Yarn: $(yarn --version)
Pnpm: $(pnpm --version)
Rustc: ${$(rustc --version):6}
Go: ${$(go version):13}
Python3: ${$(python3 --version):7}"
}

function listening() {
  if [ $# -eq 0 ]; then
    sudo lsof -iTCP -sTCP:LISTEN -n -P
  elif [ $# -eq 1 ]; then
    sudo lsof -iTCP -sTCP:LISTEN -n -P | grep -i --color $1
  else
    echo "Usage: listening [pattern]"
  fi
}

function n() {
  if [[ ${1##*.} == 'ts' ]]; then
    ts-node $@
  else
    node $@
  fi
}

function t() {
  if [[ -f ./package.json ]]; then
    nr test
  else
    cargo test
  fi
}

function i() {
  cd ~/code/$1
}

# ------------------------ alias -----------------------------
alias update_all='proxy && brew update && brew upgrade && brew upgrade --cask && brew cleanup && update-nvm && npm upgrade -g --latest && pnpm up -g --latest && rustup update && omz update && git -C ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k pull'
alias lstcp="sudo lsof -iTCP -sTCP:LISTEN -P -n"
# override the oh-my-zsh defined at ~/.oh-my-zsh/lib/directories.zsh
alias l="lsd -lah"
alias rmr="rm -r"

# CEP debug mode
alias enable_cep_debug="defaults write com.adobe.CSXS.11 PlayerDebugMode 1"
alias disable_cep_debug="defaults write com.adobe.CSXS.11 PlayerDebugMode 0"

# git
alias ga="git add -A"
alias gp="git push"
alias gpf="git push --force"
alias gpl="git pull"
alias gpm="git pull origin master"
alias gcm="git commit -m"
alias gam="ga && gcm"
alias gca="git commit --amend"
alias gc="git checkout"
alias gcb="git checkout -b"
alias gcl="git clone"
alias gr="git reset --hard"
alias m="git checkout master"

# vscode
alias rc="code-insiders ~/.zshrc"
alias c="code-insiders"

# node package manager
alias nio="ni --prefer-offline"
alias nido="ni -D --prefer-offline"
alias nid="ni -D"
alias nio="ni"
alias nio="ni --prefer-offline"
alias s="nr start"
alias upkgs="ncu -u -t minor"
alias b="nr build"

# cargo
alias cr="cargo run"

# ------------------------ environment variables -----------------------------
export PNPM_HOME="/Users/yutengjing/Library/pnpm"
export PATH="$PNPM_HOME:$PATH"

# pyenv
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"

# set node_modules/.bin to path when in VSCode terminal
if [[ "$TERM_PROGRAM" == "vscode" && -d "$PWD/node_modules/.bin" ]]; then
  export PATH="$PWD/node_modules/.bin:$PATH"
fi
meganrogge commented 1 year ago

/duplicate #160920 and should be fixed in insider's tomorrow

VSCodeTriageBot commented 1 year ago

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!