How does @selection argument to a kitten work? #8347
-
On https://sw.kovidgoyal.net/kitty/kittens/custom/#passing-arguments-to-kittens, it is written:
So I tried using How to get the selection? |
Beta Was this translation helpful? Give feedback.
Answered by
kovidgoyal
Feb 18, 2025
Replies: 1 comment 7 replies
-
That only applies when you are running the kitten via a mapping. If you
want to get the selection from the command line use
kitten @ get-text --extent=selection
…On Tue, Feb 18, 2025 at 04:03:50AM -0800, Siddh Raman Pant wrote:
On https://sw.kovidgoyal.net/kitty/kittens/custom/#passing-arguments-to-kittens, it is written:
> The special argument ***@***.***` is replaced by the currently selected text in the active kitty window.
So I tried using `... kitten script.py @selection` to pass the currently selected text to a kitten. But I get ***@***.***"` instead of the selected text on `args[1]`.
How to get the selection?
--
Reply to this email directly or view it on GitHub:
#8347
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
--
_____________________________________
Dr. Kovid Goyal
https://www.kovidgoyal.net
https://calibre-ebook.com
_____________________________________
|
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's passed to args of main(). If you want to get the selection in handle_result you do it using kitty apis.