commit 888d3dcb5341c5281adb8b53d701ecdf795d64d5
parent 56c1c0d823f4854cc94442c81e132e6f2731b3ff
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Thu, 10 Sep 2020 14:50:21 +0200
shell: fsel->gsf ("get selected file")
Former-commit-id: 1f40420ee1d5552bcd3bfa14a0abdaca81ec9563
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/shell/functions b/shell/functions
@@ -70,7 +70,7 @@ if command -v osascript &> /dev/null; then
osascript -e 'tell application "Finder" to if (count of Finder windows) > 0 then get POSIX path of (target of front Finder window as text)'
}
# echo selected Finder file
- fsel() {
+ gsf() {
osascript -e 'tell application "Finder" to return POSIX path of (first item of (get selection as alias list) as alias)' | rev | sed 's/^\///' | rev;
}
fi