import-prezto-themes — Prezto Theme Importer
Synopsis
import-prezto-themes [options] [theme...]
import-prezto-themes --list
import-prezto-themes sorin pure agnoster
```bash
## Description
Imports Prezto prompt themes into your zshand plugins directory. Prezto themes use zsh's built-in `promptinit` system, making them highly portable.
Imported themes are placed in `~/.config/zshand/plugins/` with a `03-prezto-theme-` prefix and can be activated by setting `ZSHAND_PREZTO_THEME` in your env.zsh.
## Options
| Option | Description |
|--------|-------------|
| `-l, --list` | List available Prezto themes |
| `-n, --dry-run` | Show what would be done without doing it |
| `-f, --force` | Overwrite existing theme files |
| `-c, --clone` | Clone Prezto repository if not found locally |
| `-p, --path DIR` | Specify Prezto installation path |
| `-h, --help` | Show help message |
## Prezto Locations
The tool searches these locations for Prezto:
1. `$ZPREZTODIR` (if set)
2. `~/.zprezto`
3. `~/.prezto`
4. `/usr/local/share/prezto`
## Theme Types
### Built-in Themes
These are bundled with Prezto in `modules/prompt/functions/`:
| Theme | Description |
|-------|-------------|
| `sorin` | The default Prezto theme (fast, git-aware) |
| `steeef` | Colorful, git-aware |
| `nicoulaj` | Minimal, informative |
| `damoekri` | Clean, multi-line |
| `giddie` | Simple with git info |
| `kylewest` | Username, host, directory |
| `minimal` | Bare bones |
| `peepcode` | Ruby-focused |
| `skwp` | YADR theme |
| `smiley` | Exit status smiley |
### External Themes
These are in `modules/prompt/external/` and may need submodule initialization:
| Theme | Notes |
|-------|-------|
| `agnoster` | Powerline-style, segment-based |
| `powerline` | Powerline clone |
| `pure` | Minimal, async git info |
| `powerlevel10k` | P10k started as a Prezto theme |
## Examples
```zsh
# List available themes
import-prezto-themes --list
# Import the sorin theme (Prezto default)
import-prezto-themes sorin
# Import multiple themes
import-prezto-themes sorin steeef nicoulaj
# Clone Prezto and import theme
import-prezto-themes --clone sorin
# Force overwrite existing theme
import-prezto-themes --force sorin
# Preview import without changes
import-prezto-themes --dry-run pure
```bash
## Theme Activation
After importing, add to your `~/.config/zshand/env.zsh`:
```zsh
export ZSHAND_PREZTO_THEME=sorin
```bash
This loads the Prezto theme instead of Powerlevel10k.
## Generated Files
| File | Purpose |
|------|---------|
| `03-prezto-theme-<name>.zsh` | Theme wrapper with promptinit setup |
Example generated wrapper:
```zsh
# Prezto theme: sorin
# Imported by import-prezto-themes on 2026-02-03T10:00:00
# Add theme function to fpath
fpath=("/path/to/prompt_sorin_setup" $fpath)
# Initialize prompt system
autoload -Uz promptinit
promptinit
# Set the prompt
prompt sorin
```bash
## How Prezto Themes Work
Prezto themes use zsh's native prompt system (`promptinit`):
1. Theme files are named `prompt_<name>_setup`
2. Added to `$fpath` so `autoload` can find them
3. `promptinit` registers available prompts
4. `prompt <name>` activates the theme
This is different from Oh-My-Zsh themes which set `PROMPT` directly.
## Installing Prezto
If Prezto is not installed:
```zsh
# Clone with submodules (for external themes)
git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto
# Or use the --clone flag
import-prezto-themes --clone sorin
```bash
To initialize external theme submodules later:
```zsh
cd ~/.zprezto
git submodule update --init --recursive
```bash
## See Also
- [`import-ohmyzsh-plugins`](import-ohmyzsh-plugins.md) — Oh-My-Zsh plugin and theme importer
- [`import-p10k-theme`](import-p10k-theme.md) — Powerlevel10k preset themes
- [Prezto GitHub](https://github.com/sorin-ionescu/prezto)