Cannot send parameters to Python API in version 3.3.9
Prior to version 3.3.9, I could run the following to use the Python API, create a new window, set my title/profile, and run a command.
~/bin/iterm-tab.py TabName ProfileName 'ssh [email protected]'
Now in 3.3.9, I am prompted to allow the script to run every time. I see from https://gitlab.com/gnachman/iterm2/-/wikis/iTerm2-Version-3.3-Security-Updates, that there is a way around this by wrapping the Python script in an osascript.
#!/usr/bin/osascript tell application "iTerm2" launch API script named "iterm-tab.py" end tell
I cannot find a way to pass iterm-tab.py any parameters. Is there a solution for this? On another note, I cannot find a way to call
~/bin/iterm-tab.py so I have moved it to
In case it is relevant, my use case is that I create aliases for hundreds of servers and databases of various types. I can then type the name of the server/database and get a new tab connected via SSH/sqlplus/psql/sqlline/etc. If there's a better way to do this, I'm certainly open to that.