Skip to content

Sidebar opens at parent directory instead of current directory on macOS #16

@zhiyuanzhai

Description

@zhiyuanzhai

Description:

On macOS, treemux opens the sidebar at the parent directory of the current working directory instead of the actual current directory.

Steps to reproduce:

  1. Open a tmux session
  2. cd to a specific directory (e.g., /Users/username/project)
  3. Press Ctrl-b Tab (or custom key) to open treemux sidebar
  4. The sidebar opens at the parent directory (/Users/username) instead of /Users/username/project

Expected behavior:

The sidebar should open at /Users/username/project but instead opens at /Users/username.

Debugging notes:

  • lsof -a -d cwd -p <pid> correctly returns the full path (e.g., /Users/zhiyuanzhai/project)
  • However, the Python script go_random_within_rootdir.py returns a truncated path (the parent directory)
  • This appears to be related to how the Lua code in go_random_within_rootdir.py handles path comparison on macOS

Environment:

  • macOS Tahoe 26.2
  • tmux 3.6a
  • Neovim with nvim-tree

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions