集成终端设置 VS Code 和 iTerm 返回 zsh [英] Integrated Terminal Setting VS Code and iTerm returns zsh

查看:75
本文介绍了集成终端设置 VS Code 和 iTerm 返回 zsh的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm trying to use iterm as my focus terminal inside vscode. I've setup "terminal.external.osxExec": "iTerm.app", but I get zsh instead of iTerm.

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

I'm able to right click on a file and open in iterm but I love the integrated terminal, and want to use iTerm here.

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

How do I use iterm as my terminal?

推荐答案

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

iTerm 不是 shell,而是终端模拟器,在您的情况下,它运行的是 zsh shell.

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

I believe you are confusing the terms Shell and a terminal emulator.

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

iTerm is a terminal emulator. Some examples of terminal emulator are Gnome terminal, Guake, Xterm etc. They provide a display to the shell which is installed in the OS.

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

A shell is a command line interface that reads and interprets your commands. Examples of shell are bash which comes by default in Linux and other shells like zsh, fish, sh.

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

Visual Studio Code integrated terminals use the shell itself and not the terminal emulator. In Windows OS the distinction between shell and terminal emulator is not present so Powershell and Command Prompt are both the shell and the emulator.

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

But for Unix like OSes there is a distinction.

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

I believe you use iTerm as the terminal emulator and the shell used is zsh (pronounced Z Shell which is a fork of bash Bourne Again Shell).

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

Here is a wikipedia article on Unix Shell. This talks about what a Unix shell really is.

这个链接是关于终端模拟器的,它也谈到了终端的历史.

This link is about Terminal emulators which also talks about the history of terminals.

此链接提供了终端模拟器列表可用的.iTerm 是 Mac OS 的终端模拟器.

This link gives a list of terminal emulators that are available. iTerm is a terminal emulator for Mac OS.

这篇关于集成终端设置 VS Code 和 iTerm 返回 zsh的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆