Skip to content

Workspace loader: expand ~ and resolve relative start_directory like tmuxp #123

Open

Description

@tony

Summary

The workspace loader handles start_directory differently from tmuxp in two cases, found while writing the hand-written catalog expectations (libtmux-ruby#103). The catalog test records both as differences instead of passing them:

  • A leading ~ in start_directory is not expanded, so main-pane-height.yaml and start-directory.yaml load but stop at apply preflight.
  • A relative window start_directory resolves against the workspace file's directory, not the session's start_directory.

Motivation

tmuxp documents both behaviours. A user moving a tmuxp file to this loader gets a preflight refusal or a pane in the wrong directory.

Proposal

Expand a leading ~ the way the shell would. Resolve a relative window or pane start_directory against its parent's start_directory when one is set. Then drop the recorded differences from the catalog test, so start-directory.json and main-pane-height.json match.

References

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions