m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-16 23:33:39 -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 end tell
tell application "iTerm2" tell application "iTerm2"
set myterm to (create window with default profile) 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 "cd " & quoted form of (item 2 of argv)
write text (item 1 of argv) & " && exit" write text (item 1 of argv) & " && exit"
end tell end tell
@@ -106,3 +109,5 @@ osascript -e \
end tell end tell
end run' "$1" "$PWD" 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.