Tabs#

This page covers everything you can do with tabs: open them, switch between them, reorder them, find them, name them, and color them.

SUPER is the Command key on macOS and the Windows or Super key on other systems. The keys below are the defaults. Every command is also in the command palette (SUPER+SHIFT+P). Override a bundled command by ID in ~/.config/nash/commands.toml, including its keys or action. See Commands and tasks.

Open a tab#

CommandKeysWhat it does
New Tab to the RightSUPER+T, CTRL+SHIFT+TOpens a tab directly to the right of the active tab.
New Tab at the EndSUPER+Y, CTRL+SHIFT+YOpens a tab at the end of the tab bar.
New Tab with 2 PanesSUPER+SHIFT+YOpens a tab to the right of the active tab, already split in 2.
New Tab with 3 PanesSUPER+SHIFT+UOpens a tab to the right of the active tab, already split in 3.

These are the bundled shortcuts since Nash 0.11.4. Before that release, SUPER+T opened a tab at the end and SUPER+SHIFT+T opened one to the right. SUPER+SHIFT+T now reopens a closed tab. Existing commands.toml shortcut overrides can retain the old behavior; remove their keys fields to inherit the new defaults.

New Tab to the Right needs Nash 0.2.0 or newer. The two pre-split commands need Nash 0.7.3 or newer.

The pre-split tabs use the SpawnTabWithColumns action. It splits the new tab into equal columns side by side. The first column keeps the focus, and the other columns start in the first column's working directory. If the pane is too narrow for that many columns, Nash refuses the request.

To get a different number of columns, add your own command to ~/.config/nash/commands.toml:

[[command]] id = "new_tab_four_panes" title = "New Tab with 4 Panes" description = "Opens a new tab to the right of the current one, split into four columns" menubar = ["Shell"] icon = "md_view_column" action = { SpawnTabWithColumns = { domain = "CurrentPaneDomain", columns = 4 } }

Add a keys = [{ key = "...", mods = "SUPER|SHIFT" }] line to bind it to a key that is free in your setup.

Reopen closed tabs#

Since Nash 0.11.4, press SUPER+SHIFT+T (Cmd+Shift+T on macOS), or run Reopen Closed Tab from the command palette or Shell menu. Repeated uses reopen older tabs in the same window. With no closed tab to reopen, nothing happens. CTRL+SHIFT+T opens a new tab; it does not reopen one.

A reopened tab returns to its old position with its name, color, Zen Mode, and split layout, including the active, zoomed, and folded panes. Each pane starts a new shell in its recorded working directory and domain. If the recorded domain is missing or was excluded from the saved layout, Nash uses the default domain instead. A spawn failure in an available domain is reported, not retried in the default domain.

This does not recover live processes or scrollback. When shell integration recorded a command that was still running, reopening types and submits that command again. A deploy or database migration can therefore run a second time.

Each window keeps its 25 most recently closed tabs in memory. Closing the window or restarting Nash clears that list. Closing the last tab closes its window, so that tab cannot be reopened this way. For saved layouts across restarts, use session restore.

Nash remembers tabs closed with the tab's close button, Close Current Tab, or Close Current Pane when it closes the last pane. It does not remember tabs whose processes exited by themselves or tabs lost by moving their last pane. Since Nash 0.11.9, this also works for explicitly closed mux tabs whose spawnable domain is attached. Reopening starts new processes in that domain, with the same command replay and no scrollback described above; it does not reconnect to the old processes. Closing a mux window normally detaches its running panes instead, so it adds no closed tab to this list.

The closed-tab list is GUI-local, not shared with other clients. If Nash cannot start a reopened tab, a notification explains why and the tab stays in the list for another attempt.

To change the shortcut, override reopen_closed_tab in commands.toml:

[[command]] id = "reopen_closed_tab" keys = [{ key = "t", mods = "SUPER|SHIFT|ALT" }]

Split the active pane into columns#

Split Pane into 3 Columns, in the command palette and Shell menu, divides only the active pane. The original pane stays on the left and keeps focus; two new panes open to its right in the same working directory. Other panes in the tab keep their sizes.

In Nash 0.10.1, the bundled shortcut is SUPER+I (Cmd+I on macOS), and the layout uses 30–40–30 proportions. Previously, the default was SUPER+SHIFT+I with three equal columns. New tabs opened with SUPER+SHIFT+Y or SUPER+SHIFT+U still use equal-width columns.

Since Nash 0.11.1, the command also arranges a row. In a tab of two or three panes side by side, it adds the missing pane at the right end and gives the three columns their 30–40–30 widths again.

Customize column widths#

Override the bundled command in ~/.config/nash/commands.toml:

[[command]] id = "split_pane_three_columns" keys = [{ key = "i", mods = "SUPER" }] action = { SplitPaneIntoColumns = { columns = 3, weights = [30, 40, 30] } }

columns counts all resulting panes, including the original. Optional weights specify relative widths from left to right: [3, 4, 3] produces the same layout as [30, 40, 30]. Omit weights or use an empty list for equal widths. Supply one positive integer per column when setting weights.

The equivalent Lua action is:

nash.action.SplitPaneIntoColumns { columns = 3, weights = { 30, 40, 30 }, }

domain is optional and defaults to "CurrentPaneDomain". Nash subtracts divider cells before allocating widths and rounds boundaries to the nearest cell. The pane must have room for at least one cell per column and one per divider. Invalid weights or a split that leaves any column with zero cells are refused before new panes are spawned. The maximum is 100 columns.

Existing overrides on upgrade#

A saved override of split_pane_three_columns keeps its explicit shortcut or action, including the old equal-width layout. Remove fields you did not customize to inherit the new bundled defaults. Print the current defaults with nash config defaults commands.toml; Nash does not rewrite your overrides.

Switch tabs#

CommandKeys
Activate tab 1 to 9SUPER+1 to SUPER+9, CTRL+SHIFT+1 to 9
Activate the right-mostSUPER+0, CTRL+SHIFT+0
Activate the next tabSUPER+SHIFT+]
Activate the previous tabSUPER+SHIFT+[
Search TabsSUPER+SHIFT+A

In Nash 0.9.0 or newer, SUPER+9 activates the ninth tab and SUPER+0 activates the right-most tab. SUPER+0 no longer resets the font size. CTRL+0 still resets it. The CTRL+SHIFT variants are for systems where the window manager takes the SUPER key.

Since Nash 0.11.5, ActivateTab clamps a number past the last tab to the right-most tab: with three tabs, SUPER+5 selects tab 3. This is a GUI key-action behavior; a positive out-of-range nash cli activate-tab --tab-index still reports an error rather than silently selecting a different tab.

Search tabs#

Search Tabs (Nash 0.3.0 or newer) opens a fuzzy-searchable list of every tab in every window and workspace. Each row shows the tab title, its working directory, and its foreground process. A row also carries a badge for the current tab, for a tab in another workspace, for the number of panes, and for a custom tab color.

You can search by title, working directory, process, workspace, and window title. Choosing a row raises the tab's window and activates the tab.

Reorder tabs#

Drag a tab along the tab bar (Nash 0.9.0 or newer). Press the tab and hold the button:

  1. The tab activates, and a copy of it follows the pointer.
  2. The place of the tab stays empty to show where it will land.
  3. When the copy passes the middle of a neighboring tab, the two tabs trade places, so the other tabs make room as you move.
  4. The tab lands in the gap when you release the button.

A drag reorders the tabs of one window. It does not move a tab into another window. Use Move Tab to New Window to detach a tab into a window of its own.

On macOS with integrated title buttons, the tab bar sits in the title bar. A press on a tab or on a tab bar button does not move the window. Drag the empty part of the tab bar to move the window.

These commands reorder tabs from the keyboard or the palette:

CommandKeysNotes
Move Tab LeftSUPER+SHIFT+ALT+[Swaps the active tab with the tab on its left.
Move Tab RightSUPER+SHIFT+ALT+]Swaps the active tab with the tab on its right.
Move Tab to New WindowNo default keyDetaches the active tab into its own window. Nash 0.4.0 or newer.

Since Nash 0.11.9, mux tab order is server-owned: dragging and the move commands update other attached clients and survive detach/reattach while the server runs. In mixed local/mux windows, only that server's tabs are reordered; other domains' tabs keep their slots. Move Tab to New Window moves the existing mux tab and panes without restarting programs. Tmux control-mode domains still do not support these server tab moves.

The server also shares each mux tab's color, tab-scoped Zen flag, and active pane. Global Zen Mode and Back/Forward tab history remain GUI-local; this does not make all GUI state shared.

Name tabs#

Run Rename Tab from the command palette or the Window menu. It has no default key. The editable dialog starts with the name you previously set, if there is one, so you can revise it rather than type it again. Press Enter to save or Escape to cancel. Nash handles the name as follows:

  • Whitespace in the name is collapsed to single spaces.
  • An empty name restores the automatic title.
  • Cancelling the prompt leaves the title as it was.

Nash saves a name that you set and restores it with the session. Automatic titles are not saved, because Nash works them out again. See Session Restore. Name saving needs Nash 0.7.0 or newer.

How Nash picks a title#

Nash picks the first title that applies:

  1. The name that you set with Rename Tab.
  2. The smart title.
  3. The title that the program in the pane sets.

The smart title (Nash 0.3.0 or newer) has the form folder (process), for example nash (cargo). When the foreground process is only a shell, the title is the folder alone. The folder is the last part of the working directory of the active pane, and your home directory shows as ~. The directory is more reliable when your shell reports it. See Shell Integration.

To use the pane title instead of the smart title, set this in nash.toml:

[tab] smart_titles = false

The processes that count as "only a shell" are listed in the tab_title_ignored_processes option. It is a Lua option, so set it in ~/.config/nash/custom.lua. Names are matched by executable name, ignoring case. This list replaces the default list, so include the defaults that you want to keep:

return { tab_title_ignored_processes = { 'zsh', 'bash', 'sh', 'dash', 'fish', 'tmux', 'nash', 'nash-gui', 'cmd.exe', 'powershell.exe', 'pwsh.exe', }, }

Tab bar options#

These keys go in the [tab] table of ~/.config/nash/nash.toml. The values are the ones in the file that Nash ships.

KeyShipped valueWhat it does
show_indextrueStarts each title with the tab number. The number stays after a rename.
show_close_buttontrueShows a close button on each tab.
tab_font_size16Size of tab titles in points. It does not depend on [font] font_size.
animate_in_tab_processing_when_unfocusedtrueKeeps the busy spinner moving while Nash is in the background.

The Increase Font Size and Decrease Font Size commands also scale fancy tab titles along with terminal text; CTRL+0 resets that scale. This runtime scaling needs Nash 0.2.0 or newer and does not change the configured base tab_font_size.

tab_font_size and animate_in_tab_processing_when_unfocused need Nash 0.7.4 or newer. The spinner is the one that coding-agent status shows when an agent works.

The tab colors for the active and the inactive tab come from the theme. See Themes & Colors.

Tab highlight#

The [tab.highlight] table of nash.toml sets how Nash marks tabs (Nash 0.11.1 or newer):

[tab.highlight] style = 'top_line' color = '' line_width = '4pt' pill_length = '50%' pill_alignment = 'center' grow_duration_ms = 250
KeyShipped valueWhat it does
style'top_line''top_line', 'tinted', or 'none'. See below.
color''Highlight color of a tab without a custom color. '' uses the theme accent.
line_width'4pt'Thickness of the top line and pills. Use points for consistent DPI scaling. 0 hides both.
pill_length'50%'Length of an inactive custom-colored tab's pill. A percentage is a share of the tab's width.
pill_alignment'center''left', 'center', or 'right'; positions the pill and anchors line growth. top_line only.
grow_duration_ms250Milliseconds for the active line to grow from its pill. 0 shows the full line immediately.
  • top_line draws a line with tapered ends along the top edge of the active tab. Since Nash 0.11.4, inactive custom-colored tabs show a dimmed pill on the same edge, centered by default. Both stay on top even with a bottom tab bar.
  • tinted gives every tab a rounded, tinted body and an outline. The active tab has a stronger tint and a bright outline. This style has no pills or growth animation and ignores line_width, pill_length, pill_alignment, and grow_duration_ms.
  • none turns off every tab decoration, including custom-color pills and tints. Nash keeps the colors that you assigned to tabs.

Since Nash 0.11.4, selecting a tab grows its line outward from the pill and brightens its color. A tab without a custom color grows its line from the same shape but shows no pill while inactive. The first tab in a new window does not animate. Set grow_duration_ms = 0 to disable the growth.

Since Nash 0.11.5, pill_alignment accepts 'left', 'center', or 'right' (case-insensitive). Left grows rightward, center grows toward both edges, and right grows leftward. The shipped preset is 50% length, center alignment, 4pt thickness, and 250 ms growth. Keep explicit existing values if you prefer them.

pill_length accepts nonnegative lengths such as '50%', '24pt', or '2cell'. Percentages use the tab's width; cell uses the tab-title font's cell width. A pill is capped at the tab's width. Set pill_length = '0%' to hide inactive pills while keeping a line that grows from the selected alignment. grow_duration_ms must be an unquoted, nonnegative whole number.

A tab title that a Lua format-tab-title callback formats gets no native line, tint, or pill.

Upgrade from the old highlight keys#

The type and size keys of [tab.highlight] are retired. Config sync removes them and keeps your color. It does not translate the old values. If you used type = 'none' to turn the highlight off, set style = 'none'. Otherwise the highlight becomes the default top_line after the upgrade. See Configuration Sync.

Color a tab#

Run Tab Color from the command palette or the Window menu. It has no default key. You can pick one of 16 colors, or Default to remove the custom color and use the theme again. Nash saves the color with the session.

In Nash 0.11.5 or newer, only tabs spawned after the current tab inherit its custom color: New Tab to the Right, its pre-split variants, and tasks targeting new_tab_after_current. Tabs spawned at the end, the new-tab button, and tasks targeting new_tab do not inherit it. This narrows the inheritance introduced in 0.11.4.

Each tab keeps its own copy: recoloring one does not change the others. With no custom color on the active tab, the new tab uses the theme. New windows, nash cli spawn, Lua window:spawn_tab(), and moving a pane to a new tab do not inherit it. Since Nash 0.11.9, changing a mux tab's color is shared with other attached clients and retained by the running server across reattachment.

Tab coloring is built into Nash; no Lua tab-title callback is needed. With the top_line style in Nash 0.11.4 or newer, a tab with a custom color looks like this:

  • The line of the active tab uses the tab's color.
  • An inactive tab shows a dimmed pill in its color along the top edge. Selecting it grows that pill into the full line. These pills replace the older dots.
  • The title text uses the theme's tab text color, muted on inactive tabs.

With the tinted style, the tint and outline use the tab's color. In Nash 0.11.1, the swatches are brighter. A tab that you colored before keeps its old value; pick the swatch again to get the new color.

The panes inside a tab can fold to thin strips. See Pane Folding.