Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zellij/commands: Prevent recursive sessions #1766

Merged
merged 2 commits into from
Oct 13, 2022

Commits on Oct 13, 2022

  1. zellij/commands: Prevent recursive sessions

    with session names specified in layout files. A "recursive session" is
    created when, while running inside some zellij session, a user attempts
    to spawn zellij and make it attach to that same session.
    
    When attaching via CLI (`zellij attach`) we explicitly check for this
    condition and error out when needed.
    
    However, besides `zellij attach` it is also possible to declare the
    session to attach to in layout files like so:
    
    ```yaml
    session:
      name: "foo"
    ```
    
    This takes a different codepath when starting zellij, and hence bypases
    the checks we already have in place to avoid recursive sessions. Hence,
    we implement the check in the other codepath, too, and prevent recursive
    sessions from happening for good.
    
    Fixes: zellij-org#1735
    har7an committed Oct 13, 2022
    Configuration menu
    Copy the full SHA
    0d71f5e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    498a088 View commit details
    Browse the repository at this point in the history