osascript 打开一个新的 window 而不仅仅是一个新标签
osascript opens a new window instead of just a new tab
我正在尝试打开一个新选项卡并在其中 运行 一个命令。相反,这会打开一个新选项卡,打开一个新的 window 然后 运行 命令...我做错了什么?
exec(`osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'tell application \"Terminal\" to do script \"export KUBECONFIG=${basePath}/${answer.clustername}/${configfile}\"'`);
我必须在最后添加 in window 1
才能在新选项卡中使用(而不是打开新的 window)。
我正在尝试打开一个新选项卡并在其中 运行 一个命令。相反,这会打开一个新选项卡,打开一个新的 window 然后 运行 命令...我做错了什么?
exec(`osascript -e 'tell application \"System Events\" to tell process \"Terminal\" to keystroke \"t\" using command down' -e 'tell application \"Terminal\" to do script \"export KUBECONFIG=${basePath}/${answer.clustername}/${configfile}\"'`);
我必须在最后添加 in window 1
才能在新选项卡中使用(而不是打开新的 window)。