博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MAC OS 如何从Finder中选中目录快捷进入Terminal
阅读量:6955 次
发布时间:2019-06-27

本文共 2169 字,大约阅读时间需要 7 分钟。

  hot3.png

As of Mac OS X Lion 10.7, Terminal includes exactly this functionality as a Service. As with most Services, these are disabled by default, so you'll need to enable this to make it appear in the Services menu.

System Preferences > Keyboard > Shortcuts > Services Enable New Terminal at Folder. There's also New Terminal Tab at Folder, which will create a tab in the frontmost Terminal window (if any, else it will create a new window). These Services work in all applications, not just Finder, and they operate on folders as well as absolute pathnames selected in text.

You can even assign command keys to them.

Services appear in the Services submenu of each application menu, and within the contextual menu (Control-Click or Right-Click on a folder or pathname).

The New Terminal at Folder service will become active when you select a folder in Finder. You cannot simply have the folder open and run the service "in place". Go back to the parent folder, select the relevant folder, then activate the service via the Services menu or context menu.

In addition, Lion Terminal will open a new terminal window if you drag a folder (or pathname) onto the Terminal application icon, and you can also drag to the tab bar of an existing window to create a new tab.

Finally, if you drag a folder or pathname onto a tab (in the tab bar) and the foreground process is the shell, it will automatically execute a "cd" command. (Dragging into the terminal view within the tab merely inserts the pathname on its own, as in older versions of Terminal.)

You can also do this from the command line or a shell script:

open -a Terminal /path/to/folder This is the command-line equivalent of dragging a folder/pathname onto the Terminal application icon.

On a related note, Lion Terminal also has new Services for looking up man pages: Open man page in Terminal displays the selected man page topic in a new terminal window, and Search man Pages in Terminal performs "apropos" on the selected text. The former also understands man page references ("open(2)"), man page command line arguments ("2 open") and man page URLs ("x-man-page://2/open").

转载于:https://my.oschina.net/sqzy/blog/521099

你可能感兴趣的文章
JavaScript实现本地图片上传前进行裁剪预览
查看>>
缺8数
查看>>
python3 内置方法 字符串转换为字典
查看>>
低端手机刷机--[2.3 固件ROM] GT-i5508、5500刷安卓2.3.7 包含(教程 刷机包 等)
查看>>
细说JS中的原型与原型链
查看>>
Guava工具类
查看>>
资料汇总--Java
查看>>
Intro to Design Patterns Study Note
查看>>
550 Create directory operation failed
查看>>
【简易版】IOS仿periscope自制狂赞飘桃心
查看>>
[C++基础]021_浅拷贝和深拷贝
查看>>
日志收集框架flume的安装及简单使用
查看>>
C++ class template argument deduction
查看>>
2013年国内优秀的开源CMS系统汇总
查看>>
h5全屏接口
查看>>
数据表的基本操作
查看>>
Keepass TAN 记录的使用
查看>>
C# 语言规范_版本5.0 (第0章 目录)
查看>>
hive基本操作与应用
查看>>
继续C#开发or转做产品
查看>>