diff --git a/kittens/remote_file/main.py b/kittens/remote_file/main.py index 5c8b5b8c6..04bdf19e1 100644 --- a/kittens/remote_file/main.py +++ b/kittens/remote_file/main.py @@ -231,7 +231,7 @@ Result = Optional[str] def main(args: List[str]) -> Result: msg = 'Ask the user what to do with the remote file. For internal use by kitty, do not run it directly.' try: - cli_opts, items = parse_args(args[1:], option_text, '', msg, 'kitty remote_file', result_class=RemoteFileCLIOptions) + cli_opts, items = parse_args(args[1:], option_text, '', msg, 'kitty +kitten remote_file', result_class=RemoteFileCLIOptions) except SystemExit as e: if e.code != 0: print(e.args[0]) diff --git a/kittens/show_error/main.py b/kittens/show_error/main.py index b507d7ed4..e4e5ef312 100644 --- a/kittens/show_error/main.py +++ b/kittens/show_error/main.py @@ -24,7 +24,9 @@ The title for the error message. def real_main(args: List[str]) -> None: msg = 'Show an error message. For internal use by kitty.' - cli_opts, items = parse_args(args[1:], OPTIONS, '', msg, 'show_error', result_class=ErrorCLIOptions) + cli_opts, items = parse_args(args[1:], OPTIONS, '', msg, 'kitty +kitten show_error', result_class=ErrorCLIOptions) + if sys.stdin.isatty(): + raise SystemExit('Input data for this kitten must be piped as JSON to STDIN') data = json.loads(sys.stdin.buffer.read()) error_message = data['msg'] if cli_opts.title: