Skip to main content

Finding Plugins

zflash has no plugin registry of its own, and doesn't need one: any git repository or directory with a zsh file in it is a plugin. That means the entire zsh ecosystem works, including every oh-my-zsh plugin and theme.

Where to look​

SourceWhat you'll findHow to reference it
oh-my-zsh plugins300+ plugins: aliases and helpers for git, docker, kubectl, npm, and morezflash defer ohmyzsh/ohmyzsh plugins/<name>
zsh-usersThe "essentials": syntax highlighting, autosuggestions, history substring search, extra completionszflash defer zsh-users/<repo>
awesome-zsh-pluginsA large curated list of plugins, themes and completionszflash defer owner/repo
GitHub topics zsh-plugin and zsh-pluginsNewer and niche pluginszflash defer owner/repo
Your tools' own docsShell integrations such as starship init zsh, zoxide init zsh, fzf --zsh, direnv hook zshzflash eval '<cmd>' (Tool integrations)
Homebrew / your package managerCompletion files installed with your toolszflash fpath /opt/homebrew/share/zsh/site-functions
~/.config/zflash/plugins.zsh
# completions only
zflash fpath zsh-users/zsh-completions src

# after the first prompt
zflash defer ohmyzsh/ohmyzsh # oh-my-zsh base library
zflash defer ohmyzsh/ohmyzsh plugins/git plugins/extract plugins/colored-man-pages
zflash defer Aloxaf/fzf-tab # fzf-powered Tab completion
zflash defer zsh-users/zsh-syntax-highlighting
zflash defer zsh-users/zsh-history-substring-search
zflash defer zsh-users/zsh-autosuggestions
zflash defer MichaelAquilina/zsh-you-should-use # reminds you of aliases you forgot

Reading a plugin's README the zflash way​

Most plugin READMEs give instructions for oh-my-zsh, zinit, antigen or "manual" installs. Translate them like this:

README saysWrite in your spec
"Add foo to plugins=(...) in .zshrc" (oh-my-zsh custom plugin)zflash defer owner/foo
zinit light owner/foo, antigen bundle owner/foozflash defer owner/foo (or load, see below)
source /path/to/foo/foo.plugin.zshzflash defer owner/foo
fpath=(/path/to/foo/src $fpath)zflash fpath owner/foo src
eval "$(foo init zsh)"zflash eval 'foo init zsh'
"Run compinit after loading"Nothing: zflash runs compinit for you
"Must be loaded last"Put the line at the end of the spec

See Migrating for a full table covering each plugin manager.

Choosing a stage​

Ask: does it need to exist before I see the prompt?

Plugin kindStageWhy
Prompt / theme (starship, powerlevel10k, pure)load or evalThe prompt is drawn right after stage 1.
Shell options, exports, PATHloadCommands typed at once must see them.
Aliases, functions, oh-my-zsh pluginsdeferReady a few milliseconds after the prompt.
Widgets: autosuggestions, highlighting, fzf-tab, history searchdeferAttached to the line editor once it's idle.
Tool hooks (zoxide, direnv, fzf key bindings)eval --deferOnly needed once you start typing.
Only _* completion filesfpathNothing to source.

When unsure, try defer first. If something is missing on the very first command you type, move it to load.

Evaluating a plugin before you add it​

  • Look at the files. zflash will source the first match of <name>.plugin.zsh, *.plugin.zsh, init.zsh, <name>.zsh, *.zsh-theme, <name>.sh, *.zsh, *.sh. If the repo has several candidates, name the file explicitly.
  • Check activity. Recent commits and open issues tell you whether it will keep working with future zsh versions.
  • Measure. Run zflash bench before and after adding it.

Next steps​