Add function to show the path to the frontmost finder window
This commit is contained in:
parent
b5e354625b
commit
f6e88269c6
13
README.md
13
README.md
@ -388,6 +388,19 @@ textutil -convert html file.ext
|
|||||||
sudo chmod -RN /path/to/folder
|
sudo chmod -RN /path/to/folder
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Get Path of Frontmost Finder Window
|
||||||
|
```bash
|
||||||
|
function finder_path {
|
||||||
|
osascript -e 'tell application "Finder"'\
|
||||||
|
-e "if (${1-1} <= (count Finder windows)) then"\
|
||||||
|
-e "get POSIX path of (target of window ${1-1} as alias)"\
|
||||||
|
-e 'else' \
|
||||||
|
-e 'get POSIX path of (desktop as alias)'\
|
||||||
|
-e 'end if' \
|
||||||
|
-e 'end tell';
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
#### Hide Folder in Finder
|
#### Hide Folder in Finder
|
||||||
```bash
|
```bash
|
||||||
chflags hidden /path/to/folder/
|
chflags hidden /path/to/folder/
|
||||||
|
Loading…
Reference in New Issue
Block a user