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
| Command | Keys | What it does |
|---|---|---|
| New Tab | SUPER+T, CTRL+SHIFT+T | Opens a tab at the end of the tab bar. |
| New Tab to the Right | SUPER+SHIFT+T | Opens a tab directly to the right of the active tab. |
| New Tab with 2 Panes | SUPER+SHIFT+Y | Opens a tab to the right of the active tab, already split in 2. |
| New Tab with 3 Panes | SUPER+SHIFT+U | Opens a tab to the right of the active tab, already split in 3. |
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.
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.
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
| Command | Keys |
|---|---|
| Activate tab 1 to 9 | SUPER+1 to SUPER+9, CTRL+SHIFT+1 to 9 |
| Activate the right-most | SUPER+0, CTRL+SHIFT+0 |
| Activate the next tab | SUPER+SHIFT+] |
| Activate the previous tab | SUPER+SHIFT+[ |
| Search Tabs | SUPER+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.
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:
- The tab activates, and a copy of it follows the pointer.
- The place of the tab stays empty to show where it will land.
- When the copy passes the middle of a neighboring tab, the two tabs trade places, so the other tabs make room as you move.
- 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:
| Command | Keys | Notes |
|---|---|---|
| Move Tab Left | SUPER+SHIFT+ALT+[ | Swaps the active tab with the tab on its left. |
| Move Tab Right | SUPER+SHIFT+ALT+] | Swaps the active tab with the tab on its right. |
| Move Tab to New Window | No default key | Detaches the active tab into its own window. Nash 0.4.0 or newer. |
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:
- The name that you set with Rename Tab.
- The smart title.
- 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.
| Key | Shipped value | What it does |
|---|---|---|
show_index | true | Starts each title with the tab number. The number stays after a rename. |
show_close_button | true | Shows a close button on each tab. |
tab_font_size | 16 | Size of tab titles in points. It does not depend on [font] font_size. |
animate_in_tab_processing_when_unfocused | true | Keeps the busy spinner moving while Nash is in the background. |
active_tab_highlight_type | 'bottom' | Shape that marks the active tab: top, bottom, left, right, box, square, circle, corner, or none. |
active_tab_highlight_size | '4pt' | Size of the highlight. Use points so the size looks the same at any DPI. |
active_tab_highlight_color | '#ffffff' | Color of the highlight. If you leave it out, Nash uses the accent color. |
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.
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.
Tab coloring is built into Nash; no Lua tab-title callback is needed. Nash draws a colored tab like this (Nash 0.3.0 or newer):
- The active tab and a tab under the pointer use the full color. The title text is dark or light, whichever has the higher contrast ratio with that color.
- An inactive tab uses a dimmed version of the color and the inactive tab text color of your theme.
The panes inside a tab can fold to thin strips. See Pane Folding.