Skip to content

Feature Request: Custom Tab Naming #3425

@guanghechen

Description

@guanghechen

yazi --debug output

Yazi
      Version: 25.5.31 (Homebrew 2025-05-30)
      Debug  : false
      Triple : aarch64-apple-darwin (macos-aarch64)
      Rustc  : 1.87.0 (17067e9a 2025-05-09)

  Ya
      Version: 25.5.31 (Homebrew 2025-05-30)

Please describe the problem you're trying to solve

When working with multiple tabs, each tab is automatically named after its current working directory. This becomes problematic when:

  1. Working in deeply nested directories with similar names (e.g., multiple src folders from different projects)
  2. Switching between tabs frequently and needing to quickly identify the purpose of each tab
  3. The directory name doesn't reflect the actual task being performed in that tab

Currently, there's no way to give tabs custom, meaningful names that persist regardless of directory changes.

Would you be willing to contribute this feature?

  • Yes, I'll give it a shot

Describe the solution you'd like

Add the ability to rename tabs with custom names:

  1. New command: tab_rename - Opens an input prompt to set a custom name for the current tab
  2. Behavior:
    - Custom names should persist when navigating to different directories
    - A way to reset to the default behavior (showing directory name), e.g., by setting an empty name
  3. Display: The custom name replaces the directory name in the tab bar

Suggested keymap:
{ on = ["t", "r"], run = "tab_rename", desc = "Rename current tab" }

API suggestion:
-- In Lua plugins
cx.tabs[idx].name -- read current name (custom or directory)
cx.tabs[idx].custom_name -- read/write custom name (nil if using default)

Additional context

This feature is common in terminal multiplexers like tmux (rename-window) and would bring yazi's tab management closer to feature parity with tools users are already familiar with.

Checklist

  • I have searched the existing issues/discussions
  • The latest nightly build doesn't already have this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions