答案 0 :(得分:1)
我按照AppleScript解决了这个问题:
tell application "iTerm"
tell current session of current window
set nameOfSession to {get name} as text
set newSession to {split horizontally with same profile}
select newSession
set name to nameOfSession
end tell
end tell
将其放到~/Library/Application Support/iTerm/Scripts
,重新启动iterm2,然后您就可以在Script Menu
(more about scripts)中看到该脚本。
可能您想要映射快捷方式以在系统键盘快捷方式设置中执行脚本。