m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 07:13:48 -05:00

Added "select" command to iTerm2 3.0+ AppleScript for multiple monitors on macOS Sierra.

Alan MacDougall
2017-02-01 15:30:05 -05:00
parent d7021aeb4b
commit 1d7cfe7882

@@ -93,7 +93,10 @@ osascript -e \
end tell
tell application "iTerm2"
set myterm to (create window with default profile)
tell current session of first window
tell myterm
select
end
tell current session of myterm
write text "cd " & quoted form of (item 2 of argv)
write text (item 1 of argv) & " && exit"
end tell
@@ -105,4 +108,6 @@ osascript -e \
activate
end tell
end run' "$1" "$PWD"
```
```
The `tell myterm select` may be helpful when the new window opens on a monitor which does not have the main iTerm2 window. My system, running macOS Sierra, does not automatically focus the newly opened window.