Merge branch 'ssh-cwd' of https://github.com/page-down/kitty
This commit is contained in:
commit
f6edb774fc
@ -20,7 +20,7 @@ from typing import (
|
|||||||
from .child import ProcessDesc
|
from .child import ProcessDesc
|
||||||
from .cli_stub import CLIOptions
|
from .cli_stub import CLIOptions
|
||||||
from .config import build_ansi_color_table
|
from .config import build_ansi_color_table
|
||||||
from .constants import appname, is_macos, shell_path, wakeup
|
from .constants import appname, is_macos, wakeup
|
||||||
from .fast_data_types import (
|
from .fast_data_types import (
|
||||||
BGIMAGE_PROGRAM, BLIT_PROGRAM, CELL_BG_PROGRAM, CELL_FG_PROGRAM,
|
BGIMAGE_PROGRAM, BLIT_PROGRAM, CELL_BG_PROGRAM, CELL_FG_PROGRAM,
|
||||||
CELL_PROGRAM, CELL_SPECIAL_PROGRAM, CURSOR_BEAM, CURSOR_BLOCK,
|
CELL_PROGRAM, CELL_SPECIAL_PROGRAM, CURSOR_BEAM, CURSOR_BLOCK,
|
||||||
@ -47,7 +47,7 @@ from .typing import BossType, ChildType, EdgeLiteral, TabType, TypedDict
|
|||||||
from .utils import (
|
from .utils import (
|
||||||
get_primary_selection, kitty_ansi_sanitizer_pat, load_shaders, log_error,
|
get_primary_selection, kitty_ansi_sanitizer_pat, load_shaders, log_error,
|
||||||
open_cmd, open_url, parse_color_set, path_from_osc7_url,
|
open_cmd, open_url, parse_color_set, path_from_osc7_url,
|
||||||
resolve_custom_file, sanitize_title, set_primary_selection
|
resolve_custom_file, resolved_shell, sanitize_title, set_primary_selection
|
||||||
)
|
)
|
||||||
|
|
||||||
MatchPatternType = Union[Pattern[str], Tuple[Pattern[str], Optional[Pattern[str]]]]
|
MatchPatternType = Union[Pattern[str], Tuple[Pattern[str], Optional[Pattern[str]]]]
|
||||||
@ -1172,7 +1172,7 @@ class Window:
|
|||||||
return self.child.foreground_cwd or self.child.current_cwd
|
return self.child.foreground_cwd or self.child.current_cwd
|
||||||
|
|
||||||
def modify_argv_for_launch_with_cwd(self, argv: List[str]) -> str:
|
def modify_argv_for_launch_with_cwd(self, argv: List[str]) -> str:
|
||||||
if argv[0] != shell_path or not self.screen.last_reported_cwd:
|
if argv[0] != resolved_shell(get_options())[0] or not self.screen.last_reported_cwd:
|
||||||
return self.cwd_of_child or ''
|
return self.cwd_of_child or ''
|
||||||
from kittens.ssh.main import is_kitten_cmdline, set_cwd_in_cmdline
|
from kittens.ssh.main import is_kitten_cmdline, set_cwd_in_cmdline
|
||||||
ssh_kitten_cmdline: List[str] = []
|
ssh_kitten_cmdline: List[str] = []
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user