A pragmatic terminal file viewer and search helper.
show is implemented in Nushell and designed to be used from a modern shell environment.
It renders files intelligently in your terminal and acts as a reliable
preview command for fzf. It selects the best available renderer based on
mime detection, terminal capabilities, and installed tools — with safe fallbacks.
This is not a pager replacement and not a file manager.
It is glue that makes existing CLI tools work together predictably.
show uses a simple renderer pipeline:
File
↓
MIME detection
↓
renderer list
↓
first compatible renderer
↓
output
For each file:
- The MIME type is detected (using
fileif available) - Matching renderer groups are looked up
- Renderers are tried in order
- The first renderer that:
- is available
- supports the current terminal
- has all required commands installed
is used
If no renderer matches, show falls back safely.
This usually means printing the filepath or listing directory contents,
depending on the input type.
A text/plain file may be rendered by:
batsedcat
If bat is installed, it is used.
If not, sed is tried.
If that fails, cat is used.
For /bin/sh, bash, zsh:
export FZF_DEFAULT_OPTS='--preview="show --glob --jump-to-line '\'' {2} '\'' {1}" --delimiter=":"'Same with nu
$env.FZF_DEFAULT_OPTS = r#'--preview="show --glob --jump-to-line ' {2} ' {1}" --delimiter=":"'#The spaces around {2} are intentional.
They avoid a known fzf issue where empty fields are replaced with nothing,
which can break argument boundaries.
Preview a file:
show file.txtPreview a directory (searches for common files like README, configurable):
show -g .Use as an fzf preview command:
fzf --preview 'show {}'Jump to a specific line (used automatically by show search):
show -j 120 file.txtEnable debug logging:
show --debug file.txtshow search combines ripgrep and fzf and reuses the same preview logic.
show search -F 'open --raw'Search only certain files:
show search -g '**/*.nu'Search in another directory without having to cd to it:
show search -d ~/projects/show/testbed 'success'Enable auto-reload (rerun ripgrep on each query change):
show search -g '**/*.nu' -aPreviews shown during search are rendered exactly like show file, including
syntax highlighting and image support.
Selecting files in fzf results in an opened Editor at the given line if your Editor supports that.
Configuration is optional.
By default, show works out of the box.
It can be customized via:
$XDG_CONFIG_HOME/show/config.toml
You can configure:
- Which files are searched when previewing directories
- MIME type → renderer mappings
- terminal-specific renderer restrictions
- editor integration for
show search
The configuration is merged on top of sane defaults.
See config.toml and config.example.toml in the repository for all available options.
Image previews are supported when the terminal allows it.
Supported renderers (used if available):
kitten icat(kitty, ghostty)imgcat(iTerm2)chafa(sixel / ASCII fallback)
If image rendering is not supported, show falls back to print the path.
Required:
- Nushell
Optional (used if available):
- bat
- ripgrep
- fzf
- chafa
- kitty (
kitten icat) - imgcat
- sed
- less
Missing tools are handled gracefully.
This is based on fzf-preview.sh as well as a blog post by junegunn the author of fzf.
MIT OR Apache-2.0