Mac osx 命令行快速跳轉到Finder當前打開的目錄

文本編輯器 Finder OS X Mac 扣丁禪師 2017-05-18

vim ~/.bashrc,添加如下 bash 函數(末尾附代碼):

Mac osx 命令行快速跳轉到Finder當前打開的目錄

cdfiner

使用時的效果圖如下:

Mac osx 命令行快速跳轉到Finder當前打開的目錄

how to use cdfiner

附代碼:

function cdfinder(){

cd "$(osascript -e 'tell application "Finder"' \

-e 'set myname to POSIX path of (target of window 1 as alias)' \

-e 'end tell' 2>/dev/null)"

}

相關推薦

推薦中...