过去,在阿尔弗雷德中,我们可以将热键绑定到选定的文件,然后它将返回到文件的路径:


升级到Mac之后,它现在返回空字符串:

为什么会发生这种情况,以及如何恢复原来的行为?
发布于 2022-01-17 11:03:08
但是我找到了一种新的方法来解决这个问题。守则如下:
#! /bin/bash
CurrentSelectPath=$(osascript <<EOF
tell application "Finder"
set theItems to selection
set filePath to (POSIX path of (the selection as alias))
end tell
set q to filePath
return q
EOF
)
echo $CurrentSelectPathhttps://stackoverflow.com/questions/70696054
复制相似问题