Fix SHELL env var in open-actions.conf and launch-actions.conf
Only the executable path is used when expanding `$SHELL`.
Also fix the non-working example `{SHELL}` in the documentation.
This commit is contained in:
parent
1f00c27097
commit
352f940010
@ -68,6 +68,13 @@ some special variables, documented below:
|
||||
The path, query and fragment portions of the URL, without any
|
||||
unquoting.
|
||||
|
||||
``EDITOR``
|
||||
The terminal based text editor. The configured :opt:`editor` in
|
||||
:file:`kitty.conf` is preferred.
|
||||
|
||||
``SHELL``
|
||||
The path to the shell. The configured :opt:`shell` in :file:`kitty.conf` is
|
||||
preferred, without arguments.
|
||||
|
||||
.. note::
|
||||
You can use the :opt:`action_alias` option just as in :file:`kitty.conf` to
|
||||
|
||||
@ -74,7 +74,7 @@ def parse(lines: Iterable[str]) -> Iterator[OpenAction]:
|
||||
with to_cmdline_implementation.filter_env_vars(
|
||||
'URL', 'FILE_PATH', 'FILE', 'FRAGMENT', 'URL_PATH',
|
||||
EDITOR=shlex.join(get_editor()),
|
||||
SHELL=shlex.join(resolved_shell(get_options()))
|
||||
SHELL=resolved_shell(get_options())[0]
|
||||
):
|
||||
for (mc, action_defns) in entries:
|
||||
actions: List[KeyAction] = []
|
||||
@ -234,12 +234,11 @@ action show_kitty_doc $URL_PATH
|
||||
|
||||
@run_once
|
||||
def default_launch_actions() -> Tuple[OpenAction, ...]:
|
||||
SHELL = resolved_shell(get_options())
|
||||
return tuple(parse(f'''\
|
||||
return tuple(parse('''\
|
||||
# Open script files
|
||||
protocol file
|
||||
ext sh,command,tool
|
||||
action launch --hold --type=os-window kitty +shebang $FILE_PATH {SHELL}
|
||||
action launch --hold --type=os-window kitty +shebang $FILE_PATH $SHELL
|
||||
|
||||
# Open shell specific script files
|
||||
protocol file
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user