From b7e8bd2faf5d5935565cd0419f6e7e209404e5e1 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 20 Oct 2017 18:02:39 +0530 Subject: [PATCH] Fix error when using @arg for stdin and no match found --- kitty/boss.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kitty/boss.py b/kitty/boss.py index e697936c4..e60aec2d1 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -307,7 +307,9 @@ class Boss: return w.buffer_as_text() if args[0].startswith('@'): - stdin = data_for_at(args[0]).encode('utf-8') + stdin = data_for_at(args[0]) or None + if stdin is not None: + stdin = stdin.encode('utf-8') del args[0] cmd = []