From b244d13e8a3353b79752f1c2ce7465929c5ce1f2 Mon Sep 17 00:00:00 2001 From: Andrew Lazarus Date: Wed, 12 Dec 2018 09:20:41 -0800 Subject: [PATCH] update docs for kitten STDIN --- docs/kittens/custom.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/kittens/custom.rst b/docs/kittens/custom.rst index 91036bb4c..4edbe650e 100644 --- a/docs/kittens/custom.rst +++ b/docs/kittens/custom.rst @@ -68,7 +68,12 @@ function, telling kitty what kind of input your kitten would like. For example: .. code-block:: py - def handle_result(...): + # in main, STDIN is for the kitten process + def main(args): + return sys.stdin.read() + + # in handle_result, STDIN is for the kitten runner (probably a TTY) + def handle_result(args, stdin_data, target_window_id, boss): pass handle_result.type_of_input = 'text'