什么是切换在Mac OS X中的优胜美地隐藏/显示隐藏文件的最快方法? [英] What is the quickest way to toggle hide/show hidden files on a Mac OS X Yosemite?
本文介绍了什么是切换在Mac OS X中的优胜美地隐藏/显示隐藏文件的最快方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在优山美地,我想切换隐藏/显示Mac上的所有隐藏文件。
I'm on Yosemite, and I want to toggle hide/show all the hidden files on a Mac.
每一次,我想做的事情,我必须去的 Terminal.app </ strong>并运行这些命令:
Every-time, I want to do that I have to go to Terminal.app and run these command :
要显示
默认写com.apple.finder AppleShowAllFiles TRUE
要隐藏
默认写com.apple.finder AppleShowAllFiles FALSE
我不知道是否有更好的调整,在那里,在短短的一个按钮,点击做到这一点。
I'm wondering if there is a better tweak out there that accomplish this in just a click of a button.
推荐答案
更新,综合考虑所有评论:
Update, considering all comments:
try
set state to (do shell script "defaults read com.apple.finder AppleShowAllFiles") as boolean
on error
set state to false
end try
do shell script "defaults write com.apple.finder AppleShowAllFiles " & (not state)
try
tell application "Finder"
set w to front window
set t to (get target of w)
if t is not startup disk then
set the target of w to startup disk
else
set the target of w to home
end if
set the target of w to t
end tell
end try
tell application (path to frontmost application as text)
display notification "ShowAllFiles is now " & (not state)
end tell
导出脚本应用程序和CMD拖动应用Finder窗口工具栏中。
Export the script as app and cmd-drag the app to the Finder window toolbar.
这篇关于什么是切换在Mac OS X中的优胜美地隐藏/显示隐藏文件的最快方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文