Fish prompt selection now works inside the terminal
Fish 3.3 adds terminal-based prompt previews and selection to fish_config. Session selection and saving remain distinct operations, with a smaller dependency path than the browser interface.
Choosing a shell prompt should be possible where the prompt is displayed. Fish has a browser configuration interface, but opening a local web server and browser is a larger operation than selecting a sample function. Fish 3.3.0, released on June 28, adds a terminal-based prompt selector to fish_config.
The new interface can list available sample prompts, display previews, load one into the current shell, and save a prompt for future use. Those are separate operations. The distinction makes it possible to try a prompt without immediately replacing the saved configuration that another shell will load.
I like fish's preference for useful defaults and direct configuration tools. A prompt selector in the terminal fits that approach. It makes an existing customization task accessible through the shell itself while retaining an explicit step for persistence.
Previewing, choosing, and saving have different effects
The versioned fish_config reference documents the new prompt subcommands. list prints sample names. show displays how the supplied samples, or all samples, would look. choose loads a sample in the current session. save writes the current prompt through funcsave.
A terminal session can inspect the choices and load the default sample directly. Listing names and displaying samples provide different ways to examine the available prompts before making that selection.
fish_config prompt list
fish_config prompt show
fish_config prompt choose default
The last command affects the current session. The documentation separately permits placing a choose command in config.fish, where it will run during configuration loading. That is one way to express a recurring selection, distinct from saving the function definition into the autoload directory.
Saving is an explicit operation. After choosing a sample, the following command requests persistence of the prompt currently loaded in the session.
fish_config prompt save
There is also a form that names a sample to choose and save, such as fish_config prompt save default. The implementation asks before overwriting the prompt. That interaction is part of the command's behavior, so saving should not be mistaken for a silent equivalent of choosing a sample in one session.
The distinction between these operations matters because fish prompts are functions. A session can contain a function definition without having stored it as the definition that future shells autoload. The selector exposes both the temporary state and the persistence operation, which makes its effects understandable without treating every preview as a configuration change.
The implementation uses the sample functions directly
The 3.3.0 implementation of fish_config shows how the terminal interface works. It finds the sample prompt files in fish's data directories. Choosing a sample sources its file in the current shell. Listing derives the available names from those files.
Showing a prompt uses a child fish process to source and render the sample. The implementation clears the child's existing right-prompt function before loading the sample, then invokes the prompt functions for display. This keeps preview execution separate from simply replacing the current shell's prompt with every sample in turn.
That detail also explains why a preview is a rendered function, not an image supplied by a theme catalog. The prompt is executable shell configuration. Its output can depend on the context in which it runs. The preview provides a way to inspect the sample's presentation using fish's actual prompt mechanism.
The save path calls funcsave fish_prompt and saves fish_right_prompt when that function exists. Left and right prompts are separate functions, so persistence has to account for both. A theme that uses a right prompt carries more configuration than a single left-side text value.
The release updates its sample prompts as well. Some duplicated or less useful samples are removed, others are cleaned up or renamed, and new samples are added. The release notes explicitly say existing installed prompts remain unchanged until a new sample is selected. Updating the set of choices does not automatically overwrite a user's saved function.
Browser configuration remains available
Calling fish_config without arguments still starts the browser interface, as does fish_config browse. The reference describes a local web server and a browser window for viewing functions, variables, and history, along with prompt and color configuration. The user closes the window and presses Enter to end the configuration session.
The new subcommand changes how an initial browser tab is selected. That selection now belongs after browse, for example fish_config browse variables. Without the explicit browse command, an argument would compete with the new command names. The release notes document this as a compatibility change in the command interface.
The implementation also makes the dependency difference visible. The browser path looks for Python and reports that dependency when it is unavailable. Its error text points users to fish_config prompt or a directly defined fish_prompt function for prompt changes. The terminal selector therefore provides a useful configuration route even when the browser tool's runtime is missing.
I prefer the resulting division of responsibilities. The terminal command covers a specific task with a small interface. The browser remains available for its broader configuration views. Neither requires the prompt-selection operation to have the same startup and dependency requirements as the entire web interface.
The release also clarifies arithmetic expressions
Version 3.3 extends the math builtin with log2, max, and min, and allows function calls without parentheses. The math reference from this version explains that fish performs shell expansion before the arithmetic expression is evaluated. Parentheses and multiplication characters therefore need quoting or escaping when they would otherwise have shell meaning.
A quoted expression keeps the function call intact. These examples use the new functions with parentheses inside quotes, so the shell does not interpret those parentheses as command substitution.
math 'max(4, 9)'
math 'log2(8)'
The arithmetic evaluator receives those expressions after the shell has processed the arguments. Optional function parentheses do not remove the need to understand that ordering. The documentation notes that commas bind to the inner function, which can make an unparenthesized nested call receive the wrong arguments.
This is another case where a convenience comes with a concrete interpretation rule. Prompt selection distinguishes loading from saving. Arithmetic distinguishes shell parsing from expression evaluation. For the new prompt interface, the outcome is especially direct: a user can inspect and choose a sample inside the terminal, then separately decide which function definition to persist.