Use a single kitty invocation for manual shell integration
This commit is contained in:
@@ -152,8 +152,10 @@ Then in your shell's rc file, add the lines:
|
|||||||
.. code-block:: fish
|
.. code-block:: fish
|
||||||
|
|
||||||
set --global KITTY_SHELL_INTEGRATION enabled
|
set --global KITTY_SHELL_INTEGRATION enabled
|
||||||
source (kitty +runpy "from kitty.shell_integration import script_path; print(script_path('fish'))")
|
set --path --local kitty_paths (kitty +runpy 'from kitty.shell_integration import print_fish_paths; print_fish_paths()')
|
||||||
set --prepend fish_complete_path (kitty +runpy "from kitty.shell_integration import fish_completions_dir; print(fish_completions_dir)")
|
source kitty_paths[2]
|
||||||
|
set --prepend fish_complete_path kitty_paths[1]
|
||||||
|
set --erase kitty_paths
|
||||||
|
|
||||||
|
|
||||||
You can get the path to the directory containing the various shell integration
|
You can get the path to the directory containing the various shell integration
|
||||||
|
|||||||
@@ -149,3 +149,7 @@ def script_path(shell: str = '') -> str:
|
|||||||
else:
|
else:
|
||||||
f = f'kitty.{shell}'
|
f = f'kitty.{shell}'
|
||||||
return os.path.join(shell_integration_dir, f)
|
return os.path.join(shell_integration_dir, f)
|
||||||
|
|
||||||
|
|
||||||
|
def print_fish_paths() -> None:
|
||||||
|
print(fish_completions_dir, script_path('fish'), sep=os.pathsep)
|
||||||
|
|||||||
@@ -769,8 +769,8 @@ def is_kitty_gui_cmdline(*cmd: str) -> bool:
|
|||||||
|
|
||||||
def reload_conf_in_all_kitties() -> None:
|
def reload_conf_in_all_kitties() -> None:
|
||||||
import signal
|
import signal
|
||||||
|
from kitty.child import cmdline_of_process
|
||||||
|
|
||||||
from kitty.child import cmdline_of_process # type: ignore
|
|
||||||
for pid in get_all_processes():
|
for pid in get_all_processes():
|
||||||
try:
|
try:
|
||||||
cmd = cmdline_of_process(pid)
|
cmd = cmdline_of_process(pid)
|
||||||
|
|||||||
Reference in New Issue
Block a user