OSX - 如何在“退出"后自动关闭终端窗口命令执行. [英] OSX - How to auto Close Terminal window after the "exit" command executed.

查看:25
本文介绍了OSX - 如何在“退出"后自动关闭终端窗口命令执行.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我用完终端后,我想退出它.现在,我有三个选择:

When I'm done with Terminal, I want to exit it. Right now, I have three options:

  1. killall 终端.它会结束这个过程,但会很突然.我认为这不是最好的主意.

  1. killall Terminal. It will end the process, but rather abruptly. I don't think this is the best idea.

呼叫退出.我已经更改了设置,因此退出会关闭终端.尽管如此,该应用程序仍然在 Dock 中显示为打开状态,并且没有执行我想要它执行的操作.

Call exit. I've changed the settings so exit closes Terminal. The app still appears open in the Dock though, and doesn't do what I want it to do.

右键单击>退出.但是,这不是退出它的终端命令.

Right click>Quit. However, this isn't a Terminal command to exit it.

那么现在,我应该退出和关闭终端的方式是什么?我听说过一些关于 osascript 的事情,但我不太确定.我想退出并关闭,以便终端不再作为窗口和进程打开.

So now, what is the way I should exit and close Terminal? I've heard something about osascript but I'm not too sure. I want to exit and close, so that Terminal is no longer open, both as a window and as a process.

推荐答案

在 Terminal.app 中

in Terminal.app

首选项 > 配置文件 >(选择配置文件)> Shell.

Preferences > Profiles > (Select a Profile) > Shell.

在当外壳退出时"选择关闭窗口"

on 'When the shell exits' chosen 'Close the window'

这篇关于OSX - 如何在“退出"后自动关闭终端窗口命令执行.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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