From 5bfed4fe2f062b7aeea0c895eeb85093c70a4d2d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 7 Jan 2022 12:48:59 +0530 Subject: [PATCH] Also launch bash/zsh/fish scripts in their respective shells --- kitty/boss.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kitty/boss.py b/kitty/boss.py index 97d3795d7..1e9c7b012 100755 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -2217,8 +2217,11 @@ class Boss: else: from .guess_mime_type import guess_type mt = guess_type(path) or '' - if os.path.splitext(path)[1].lower() in ('.sh', '.command'): + ext = os.path.splitext(path)[1].lower() + if ext in ('.sh', '.command', '.tool'): launch_cmd += [shell_path, path] + elif ext in ('.zsh', '.bash', '.fish'): + launch_cmd += [ext[1:], path] elif mt.startswith('text/'): launch_cmd += get_editor() + [path] elif mt.startswith('image/'):