Skip to content

kitty fails to load session from stdin with the --detach option #3523

@salmankhilji

Description

@salmankhilji

Describe the bug
When the --detach option, kitty does not load the given session from stdin.

To Reproduce
Steps to reproduce the behavior:

  1. Create a simple session, like this:

    echo 'launch --env FOO=BAR bash' >kitty.session
    
  2. Verify that kitty loads the session without the --detach option:

    cat kitty.session | kitty --session=-
    

    Type echo $FOO within the kitty window to verify that it has the value BAR.

  3. Now repeat with the --detach option:

    cat kitty.session | kitty --session=- --detach
    

Expected behavior
FOO shall be set to BAR.

Observed behavior
FOO is empty.

Environment details
OS: Name and version of operating system(s)

Ubuntu 20.04 LTS

$ kitty --debug-config
kitty 0.20.1 (bd746e5151) created by Kovid Goyal
Linux byteevo-scm 5.8.0-50-generic #56~20.04.1-Ubuntu SMP Mon Apr 12 21:46:35 UTC 2021 x86_64
Ubuntu 20.04.2 LTS \n \l
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.2 LTS"
Loaded config files: /home/precor/.config/kitty/kitty.conf
Running under: X11

Config options different from defaults:
tab_bar_style powerline
Added shortcuts:
	 ctrl+l KeyAction(func='combine', args=(KeyAction(func='clear_terminal', args=['scrollback', True]), KeyAction(func='send_text', args=['normal,application', b'\x0c'])))

Additional context

  • kitty is built from source. master branch @ bd746e51.
  • If reading directly from a file with the --detach option, then it works fine. i.e., the following works as expected:
    kitty --session=kitty.session --detach
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions