kitty @ kitten mykitten123.py vs. kitten mykitten123.py?
#9324
Answered
by
kovidgoyal
SpicyRicecaker
asked this question in
Q&A
Replies: 1 comment
-
|
kitten is a standalone binary written in Go meant for running the
builtin kittens which are *almost* all implemented in Go.
If you want to run a custom kitten you run it as
kitty +kitten mykitten.py
This runs the main() from mykitten and *does not* run
handle_result()
If you want to use handle_result() then you need to run
your kitten in either of two ways:
1) Via a mapping in kitty.conf
map f1 kitten mykittenpy
2) Via remote control at a shell or outside kitty
kitten @ kitten mykitten.py
or (the same thing but with kitty exe)
kitty @ kitten mykitten.py
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SpicyRicecaker
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
Thanks for making
kitty, never ceases to amaze me how low its latency is compared to other terminals (while having a ton of features and scriptability!).Today I was trying to get custom kittens working following the instructions in https://sw.kovidgoyal.net/kitty/kittens/custom/#using-kittens-to-script-kitty-without-any-terminal-ui.
I initially tested my scripts using
kitten mykitten123.py, but this resulted in thehandle_resultnever getting called at all. After 2 hours of digging through the source, reading kitty help commands, and some gpt, I finally decided to trykitty @ kitten mykitten123.pyand thehandle_resultcallback fired instantly.I don't understand at all why
kitty @ kittenworks whenkittendoesn't... my understanding is thatkitty @opens the kitty shell which has some special defined commands, including thekittencommand for launching kittens. But askittenis also defined in mainkitty's scope, I'm not sure whykitty @ kittenworks whenkittendoesn't. Is there something in the docs that I'm missing?Thanks again.
Beta Was this translation helpful? Give feedback.
All reactions