Add function to get path to integration script for the current shell

Makes setting up manual shell integration much easier. Also clean up
integration docs.
This commit is contained in:
Kovid Goyal
2021-11-08 11:11:16 +05:30
parent fadc1b539b
commit 8218df82f2
3 changed files with 48 additions and 67 deletions

View File

@@ -23,7 +23,7 @@ except ImportError:
if is_macos:
from kitty.fast_data_types import (
cmdline_of_process, cwd_of_process as _cwd,
cmdline_of_process as cmdline_, cwd_of_process as _cwd,
environ_of_process as _environ_of_process,
process_group_map as _process_group_map
)
@@ -37,6 +37,8 @@ if is_macos:
ans[pgid].append(pid)
return ans
def cmdline_of_process(pid: int) -> List[str]:
return cmdline_(pid)
else:
def cmdline_of_process(pid: int) -> List[str]: