0

I'm trying to split panes in iTerm and run commands in each pane. If I run one command after another manually it's fine. However, when I run those same commands inside of a loop I have a problem. Can anyone help?

for repo in commands["run"]:
            split = await session.async_split_pane(vertical=True)
            await split.async_send_text(f'cd Projects/{repo}')
            if repo["yarn"] == True:
               # why does this not run? it doesn't "hit the return key"
               await split.async_send_text('yarn start') 
Passaro
  • 93
  • 1
  • 8

1 Answers1

0

Solved it! It's necessary to add a \n after each string sent to iTerm2

Passaro
  • 93
  • 1
  • 8