←back to thread

700 points yen223 | 2 comments | | HN request time: 0s | source
Show context
vbezhenar ◴[] No.42058069[source]
Few additions.

open -n file.pdf : opens new instance of Preview application which is useful if you want to open the same file twice (for example to look at different pages at once).

caffeinate -d : prevents display turning off, useful if you want to look at display without moving mouse.

replies(9): >>42058131 #>>42059558 #>>42059666 #>>42060870 #>>42062814 #>>42064032 #>>42068484 #>>42068855 #>>42069659 #
alsetmusic ◴[] No.42062814[source]
Also, `cd .` to open the current directory in a Finder window.

Not mine (found online years ago), but here's the opposite. `cd` into the frontmost Finder window:

  cd "$(osascript -e 'tell app "Finder" to POSIX path of (insertion location as alias)')";
replies(2): >>42062836 #>>42064862 #
1. kps ◴[] No.42062836[source]
You mean `open .`
replies(1): >>42068896 #
2. alsetmusic ◴[] No.42068896[source]
Yeah, I had just woke up. Drat.