SendText icon indicating copy to clipboard operation
SendText copied to clipboard

SendText not working with Sublime Text 4/iTerm2

Open james-torpy opened this issue 4 years ago • 1 comments

Hi there,

I have Sublime Text 4 (build 4113) and iTerm2 (build 3.4.8), however I cannot get SendText to work with these programs.

I have adjusted the Default Settings as follows: { // Uncomment the program you want send text to: // "program": "Terminal.app", "program": "iTerm2", // "program": "tmux", // "program": "screen", "paths": { "iTerm2": "/Applications/iTerm.app" // It might be necessary to explicitly set path (usually /usr/bin // or /usr/local/bin) to tmux and screen. Uncomment below and specify // the correct path: // "tmux": "/usr/local/bin/tmux", // "screen": "/usr/local/bin/screen" } }

I have also tried not specifying a path to iTerm2, and also changing the program to "iTerm", but every time I try to send a command with 'Cmd Enter' either nothing happens, or it sends a command to Terminal instead.

Is this due to the recent Sublime upgrade, and if so will there be ongoing updates/support to SendText for this and future versions?

Any help would be much appreciated, James

james-torpy avatar Aug 22 '21 23:08 james-torpy

I don't have time to investigate this, but the command that issues to send messages to iTerm2 is here:

https://github.com/wch/SendText/blob/9276275158d1012497b2faed8b5c218eb32a5d15/SendText.py#L41-L44

It uses osascript to run some AppleScript code. If you can figure out the correct command to send messages to the terminal and want to make a PR, I'd be happy to look at it.

wch avatar Aug 23 '21 17:08 wch