Skip to content

Bug Report: File name too long Error in Yazi Home Manager #6724

Closed
@phucisstupid

Description

@phucisstupid

Summary

When enabling Fish shell integration for Yazi in Home Manager with the following configuration:

programs.yazi = {
  enable = true;
  enableFishIntegration = true;
  shellWrapperName = "y";
};

the following error occurs:

cd: File name too long
cd: Unknown error trying to locate directory
“───────┬────────────────────────────────────────────────────────────────────────
        │ File: /var/folders/xx/rkm835zx78b4z1n3_wbxv6ww0000gn/T/yazi-cwd.XXX
        │ XX.huRUF8y1j5
        │ Size: 42 B
───────┼────────────────────────────────────────────────────────────────────────
    1   │ /Users/phuc/nixos-config/.github/workflows
───────┴────────────────────────────────────────────────────────────────────────”

Steps to Reproduce

  1. Enable Yazi in Home Manager with Fish integration and set shellWrapperName = "y";.
  2. Open a Fish shell and y to use yazi.
  3. Try to go into a different directory with Yazi.
  4. After exit yazi observe the error message regarding file name length.

Expected Behavior

  • The cd command should function correctly without errors.
  • The integration should not create an excessively long or malformed path.

Actual Behavior

  • cd fails with a File name too long error.
  • The path appears to be improperly formatted and overly long.

System Information

  • OS: macOS (Darwin)
  • Shell: Fish
  • Home Manager: Latest with Nix-Darwin modules
  • Yazi Version: Latest

Additional Notes

  • This issue does not occur when enableFishIntegration = false;.
  • Other shells (e.g., Zsh, Bash) may not exhibit the same issue.
  • The error suggests a problem with how Yazi writes its temporary directory or handles Fish integration.

Possible Workarounds

  • Disabling Fish integration temporarily.
  • Using a different shellWrapperName.

Suggestions for Fix

  • Investigate how Yazi manages the Fish shell wrapper and its temporary files.
  • Check if yazi-cwd.XXX is being generated correctly.

Any insights or fixes would be appreciated!

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