From 1eee6deb228bcfe77a30d409c470ff2e9682867c Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 6 Feb 2020 16:21:40 +0530 Subject: [PATCH] Fix #2339 --- kittens/hints/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kittens/hints/main.py b/kittens/hints/main.py index dc00d9999..286a28d60 100644 --- a/kittens/hints/main.py +++ b/kittens/hints/main.py @@ -550,7 +550,8 @@ def linenum_handle_result(args, data, target_window_id, boss, extra_cli_args, *a if action == 'self': if w is not None: import shlex - w.paste_bytes(shlex.join(cmd) + '\r') + text = ' '.join(shlex.quote(arg) for arg in cmd) + w.paste_bytes(text + '\r') elif action == 'background': import subprocess subprocess.Popen(cmd)