hold windows when running shell scripts via launch services

This commit is contained in:
Kovid Goyal 2022-01-07 13:45:02 +05:30
parent 5c343c918d
commit d42f2071c3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2219,9 +2219,9 @@ class Boss:
mt = guess_type(path) or '' mt = guess_type(path) or ''
ext = os.path.splitext(path)[1].lower() ext = os.path.splitext(path)[1].lower()
if ext in ('.sh', '.command', '.tool'): if ext in ('.sh', '.command', '.tool'):
launch_cmd += [shell_path, path] launch_cmd += ['--hold', shell_path, path]
elif ext in ('.zsh', '.bash', '.fish'): elif ext in ('.zsh', '.bash', '.fish'):
launch_cmd += [ext[1:], path] launch_cmd += ['--hold', ext[1:], path]
elif mt.startswith('text/'): elif mt.startswith('text/'):
launch_cmd += get_editor() + [path] launch_cmd += get_editor() + [path]
elif mt.startswith('image/'): elif mt.startswith('image/'):