finder 打开终端_如何在当前OS X Finder位置中打开终端

finder 打开终端

finder 打开终端

Have you ever been working in OS X’s Finder and wanted to open the Terminal in that exact location? There’s an easy way to do this, and then there’s an even easier way.

您是否曾经在OS X的Finder中工作过,并想在该确切位置打开终端? 有一个简单的方法可以做到这一点,然后有一个更简单的方法。

Windows users have wielded this power for quite some time. In any File Explorer window, you can just click on the “File” menu and then you’ll see two options to open that location in a command prompt.

Windows用户使用此功能已有相当一段时间。 在任何“文件资源管理器”窗口中,您都可以单击“文件”菜单,然后在命令提示符下看到两个用于打开该位置的选项。

It’s no less easy in OS X, save for a couple steps. When you want to navigate to a location in Finder from the command line. You can open the Terminal and either change the directory by hand, which is time-consuming, or simply drag and drop that location onto the Terminal window.

在OS X中同样如此,只需几个步骤即可。 当您想从命令行导航到Finder中的位置时。 您可以打开终端并手动更改目录,这很耗时,也可以将该位置拖放到“终端”窗口中。

It’s not exactly inconvenient, and if you need to make changes to many files or folders, you can actually drag everything into the Terminal at once.

这并不是很不方便,如果您需要更改许多文件或文件夹,则实际上可以一次将所有内容拖到终端中。

So, the drag and drop method is no slouch, but there’s another way that is, when combined with a keyboard shortcut, ever faster and arguably more efficient.

因此,拖放方法并非毫无懈可击,但是还有另一种方式,当与键盘快捷键结合使用时,它会更快,更有效。

将终端快捷方式添加到服务菜单 (Adding a Terminal Shortcut to the Services Menu)

What we want to do is add one or two shortcuts to OS X’s services menu so that you can select a location, open the menu or use a keyboard combination, and instantly have a Terminal window in that location.

我们要做的是在OS X的服务菜单中添加一个或两个快捷方式,以便您可以选择一个位置,打开菜单或使用键盘组合,然后立即在该位置创建一个终端窗口。

Thus, when we select a location in Finder, then open the “Finder -> Services” menu, we’ve got two shortcuts to open that folder in a new terminal window.

因此,当我们在Finder中选择一个位置,然后打开“ Finder-> Services”菜单时,我们有两个快捷方式可以在新的终端窗口中打开该文件夹。

Similarly, right-click on that folder and you’ll see the Services menu at the bottom of the context menu.

同样,右键单击该文件夹,您将在上下文菜单的底部看到“服务”菜单。

By default, these shortcuts aren’t enabled but it is easy to do so and in the process, though optional, add keyboard combinations to really shore up your Terminal chops.

默认情况下,这些快捷方式是未启用的,但是很容易实现,在此过程中,尽管是可选的,但添加键盘组合确实可以支撑您的终端印章。

First, you want to open the Keyboard system preferences and click on the “Shortcuts” tab. If you’ve never added keyboard shortcuts to OS X, here’s a more comprehensive article you can read.

首先,您要打开键盘系统偏好设置,然后单击“快捷方式”选项卡。 如果您从未向OS X添加键盘快捷键, 那么您可以阅读以下更全面的文章

To add Terminal shortcuts to the Services menu, click on the “Services” category, scroll down to “Files and Folders” and enable “New Terminal at Folder” and if desired, “New Terminal Tab at Folder.”

要将“终端”快捷方式添加到“服务”菜单,请单击“服务”类别,向下滚动到“文件和文件夹”,然后启用“文件夹下的新终端”,并启用“文件夹下的新终端选项卡”。

Optionally, you can also add keyboard combination, which we recommend.

您也可以选择添加键盘组合(我们建议这样做)。

Now we’ve got our Terminal shortcuts enabled, and we can use them anytime we’ve got the Finder open. In our case, when we use the keyboard combination “Control + Option + Shift + T”, it will open a new Terminal window.

现在,我们启用了终端快捷方式,并且可以在打开Finder的任何时间使用它们。 在本例中,当我们使用组合键“ Control + Option + Shift + T”时,它将打开一个新的Terminal窗口。

If we use the combination “Command + Control + Option + Shift + T”, then Terminal will open a new tab rather than a new window.

如果我们使用“ Command + Control + Option + Shift + T”组合键,则Terminal将打开一个新选项卡,而不是一个新窗口。

It’s as simple as that to open Terminal windows at any location either by drag and drop, the Services menu, or a keyboard shortcut, saving you time and maybe a few extra steps.

就像通过拖放,“服务”菜单或键盘快捷键在任何位置打开终端窗口一样简单,这可以节省您的时间,并可能需要一些额外的步骤。

Let’s hear from you about your favorite OS X time-savers. Is there anything you’ve done to customize your system that you couldn’t do without? Add your feedback to our discussion forum. We’d love to hear from you.

让我们听听您最喜欢的OS X节省时间的信息。 您是否要做过一些定制您的系统的工作? 将您的反馈添加到我们的论坛。 我们很乐意听取您的意见。

翻译自: https://www.howtogeek.com/210147/how-to-open-terminal-in-the-current-os-x-finder-location/

finder 打开终端

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值