visual-studio-code - 集成终端设置 VS Code 和 iTerm 返回 zsh

标签 visual-studio-code

我正在尝试在 vscode 中使用 iterm 作为我的焦点终端。我已经设置 "terminal.external.osxExec": "iTerm.app",但我得到的是 zsh 而不是 iTerm。 screenshot of terminal in vscode

我可以右键单击一个文件并在 iterm 中打开,但我喜欢集成终端,并想在这里使用 iTerm。

我如何使用 iterm 作为我的终端?

最佳答案

您不能将 iTerm 设置为 VS Code 的集成终端。我在下面解释了原因。

iTerm 不是一个 shell,而是一个终端模拟器,在你的情况下它运行的是 zsh shell。

我相信您混淆了 Shell 和终端模拟器这两个术语。

iTerm 是一个终端模拟器。终端仿真器的一些示例是 Gnome 终端、Guake、Xterm 等。它们为安装在操作系统中的 shell 提供显示。

shell 是一个命令行界面,用于读取和解释您的命令。 shell 的例子是 Linux 中默认的 bash 和其他 shell,如 zsh、fish、sh。

Visual Studio Code 集成终端 使用 shell 本身 而不是终端模拟器。在 Windows 操作系统中,不存在 shell 和终端模拟器之间的区别,因此 Powershell 和命令提示符既是 shell 又是模拟器。

但是对于像 Unix 这样的操作系统,有一个区别。

我相信您使用 iTerm 作为终端模拟器,并且使用的 shell 是 zsh(发音为 Z Shell,它是 bash Bourne Again Shell 的一个分支)。

这是关于 Unix Shell 的维基百科文章.这讨论了 Unix shell 的真正含义。

这个链接是关于Terminal emulators它还谈到了终端的历史。

此链接给出了 list of terminal emulators
可用的。 iTerm 是 Mac OS 的终端模拟器。

关于visual-studio-code - 集成终端设置 VS Code 和 iTerm 返回 zsh,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43900516/

相关文章:

visual-studio-code - VSCode 扩展 : How to programmatically show view container in panel

php - 如何在 intelephense 中定义一个未定义的函数(在 VSCode 中)?

java - Spring @Autowired - 没有 'com.pc.visitor.visitorrepository' 类型的合格 bean

visual-studio-code - 为什么 vscode vim.otherModesKeyBindingNonRecursive 是未知配置?

python - VSCode 终端显示不正确的 python 版本和路径,从 anaconda 启动终端工作正常

python - UserWarning : Starting from version 2. 2.1,macOS 发行轮中的库文件由 Apple Clang (Xcode_8.3.3) 编译器构建

c++ - 将参数传递给 C++ 程序以在 VSCode 中进行调试

typescript - 如何在打开的编辑器中搜索具有给定扩展名的文件?

visual-studio-code - 与Phoenix和VSCode一起使用时,ElixirLS调试器意外停止

visual-studio-code - 如何增加vscode资源管理器中的缩进宽度