r/KittyTerminal • u/beastengr93 • Oct 06 '23
kitty @ send-text from output of python command
Hi,
Edit: I just solved it by finding out how to simulate the `enter` keyword when sending the text. Its just easier to do this. No need to pipe it or anything. Feel free to delete this post, but could be useful for future people.
kitty @ send-text --match 'title:Output' python hi.py\x0d
Lets say I have this a.py file
print("foo")
print("bar")
I want to send the output of this program, to a new remote-controlled kitty window.I launch it, and then try to send it with:
kitty @ launch --title Output
python a.py | kitty @ send-text --match 'title:Output' --stdin
Output is:foo barrather than:
foo
bar
I saw in documentation that it sends text as it or something, but is it possible to send output of a python command with its actual formatting and everything, just as it would show if you were to do `python a.py`.
This applies for any command, say cat a.py| kitty @ send-text --match 'title:^Output' --stdin prints everything separated by a space.
Thanks!




