# Z-Shell Wiki full corpus > Locale: en. Generated from the canonical Z-Shell Wiki build. The linked human-facing page remains the editorial source of truth. --- title: 👥 Community description: Community documentation, guides, and resources for Zsh enthusiasts and Z-Shell contributors. canonical_url: https://wiki.zshell.dev/community markdown_url: https://wiki.zshell.dev/community/index.md locale: en source_path: community/index.mdx --- # 👥 Community The Z-Shell community is home to contributors, plugin authors, and Zsh enthusiasts. Find guides, a plugin gallery, community tools, and everything you need to get involved.  Get involved Join the [Z-Shell organization](https://github.com/z-shell), help [translate the wiki](https://translate.zshell.dev/), or follow active work in [Z-shell Delivery](https://github.com/orgs/z-shell/projects/28). ## Community Sections [ ### Contributing Contribute to Zi, create Zsh plugins, improve the docs, or help with project management. Start contributing →](https://wiki.zshell.dev/community/contributing/index.md)[ ### Zsh Guide Practical guidance for Zsh options, completion, key bindings, and startup profiling. Configure Zsh →](https://wiki.zshell.dev/community/zsh-guide)[ ### Zsh Scripting Handbook Native Zsh idioms and worked techniques: array forms, expansion, pattern matching, and substitutions. Read the handbook →](https://wiki.zshell.dev/community/zsh_handbook/index.md)[ ### ZUnit A unit testing framework for Zsh: write @test blocks, run assertions, and integrate with CI. Explore ZUnit →](https://wiki.zshell.dev/community/zunit/index.md)[ ### Zsh Lint A standalone semantic analyzer for Zsh scripts with greppable static-analysis diagnostics. Explore Zsh Lint →](https://wiki.zshell.dev/community/zsh_lint/index.md)[ ### Plugin Gallery Community-curated collections of plugins, completions, snippets, services, and themes. Browse the gallery →](https://wiki.zshell.dev/community/category/-gallery-of-invocations)[ ### Zsh Plugin Standard The plugin interoperability contract: what makes a directory a plugin and how managers load it. Read the standard →](https://wiki.zshell.dev/community/zsh_plugin_standard/index.md) --- --- title: 🤝 Contributing description: Everything you need to contribute to the Z-Shell ecosystem — zi, Zsh plugins, Zi annexes, and the wiki itself. canonical_url: https://wiki.zshell.dev/community/contributing markdown_url: https://wiki.zshell.dev/community/contributing/index.md locale: en source_path: community/00_contributing/index.mdx --- # 🤝 Contributing Contributions are what make the Z-Shell ecosystem thrive. Whether you want to fix a bug in zi, publish a Zsh plugin, or improve this documentation — you are in the right place.  Code of Conduct All contributors are expected to follow our [Code of Conduct](https://www.contributor-covenant.org/version/2/1/code_of_conduct/). Please read it before participating. ## Contribution Paths Choose the path that matches what you want to do: [ ### Contribute to Zi Fix bugs, add features, improve performance, or improve the zi source code itself. Contributing to Zi →](https://wiki.zshell.dev/community/contributing/contributing_to_zi/index.md)[ ### Create a Zsh Plugin Write your own Zsh plugin following the community standard and best practices. Zsh Plugin Standard →](https://wiki.zshell.dev/community/zsh_plugin_standard/index.md)[ ### Improve the Docs Add pages, fix typos, improve guides, or help translate the wiki. Contributing to the Wiki →](https://wiki.zshell.dev/community/contributing/contributing_docs/index.md) ## Get Involved
| Action | Link |
|---|---|
| 👥 Join the team | Open a membership request |
| 🌐 Translate | translate.zshell.dev |
| 📋 Project tracker | Z-shell Delivery (Project 28) |
| 💬 Discuss | GitHub Discussions |
| Command | Purpose |
|---|---|
pnpm build | Full production build |
pnpm build:en | English-only build (faster for docs-only checks) |
pnpm serve | Serve the production build locally |
pnpm clear | Clear Docusaurus cache (use when the site behaves oddly) |
pnpm lint | Run Trunk linters and formatting checks |
pnpm lint:fix | Auto-fix linting issues |
pnpm write-heading-ids | Regenerate heading IDs across all docs |
| Directory | URL Prefix | Purpose |
|---|---|---|
docs/ | /docs | Core documentation, getting started, guides |
community/ | /community | Community guides, Zsh plugin standard, tools |
ecosystem/ | /ecosystem | Annexes, packages, plugins |
| Need | Use |
|---|---|
| Short comparison or reference matrix | GFM table with compact cells |
| Steps that must happen in order | Numbered list |
| Work readers can complete | GFM task list (- [ ]) |
| Advice, context, risk, or danger | Docusaurus admonition |
| Optional or advanced explanation | <details> with a one-line <summary> |
| Equivalent operating-system or tool instructions | <Tabs> and <TabItem> |
| Landing-page navigation | <CardGrid> and <Card> |
| Component | Usage |
|---|---|
<Highlight color="...">text</Highlight> | Colored text spans |
<Emoji symbol="🎉" label="party"/> | Accessible emoji |
<GhRepoBadge repo="z-shell/zi"/> | GitHub repo badge |
<ShellCodeCopy>command</ShellCodeCopy> | Copyable shell command |
| Scope | Covers |
|---|---|
core | lib/zsh/zi.zsh and lib/zsh/zi-*.zsh |
install | installer scripts in src |
ci | GitHub Actions workflows |
docs | repository-level documentation |
annex | annex API surface changes |
| Template | When to use |
|---|---|
| Bug report | Reproducible misbehavior |
| Feature request | New capability |
| Annex proposal | Proposing a new annex |
| Integration branch | Repositories |
|---|---|
trunk on main | all repositories except the named exception below |
next to stable main | zi |
| Type | Purpose |
|---|---|
feat | New feature |
fix | Bug fix |
perf | Performance improvement |
refactor | Code restructure, no behavior change |
docs | Documentation only |
test | Test additions or corrections |
ci | CI/CD pipeline changes |
chore | Routine maintenance |
revert | Revert a previous commit |
| View | Contents |
|---|---|
| Human delivery | Ordinary bugs, features, maintenance, and documentation |
| Automation | Bot dashboards and recurring automation records |
| Dependency maintenance | Routine dependency updates and dashboards |
| Security | Security work requiring maintainer attention |
| Administrative | Organization and repository governance |
| Namespace | Answers | Examples |
|---|---|---|
type: | What kind of work is this? | type:bug, type:feature, type:docs, type:question, type:maintenance |
area: | Which part of the ecosystem does it touch? | area:zi, area:plugin, area:annex, area:package, area:docs, area:ci |
status: | What is blocking progress? | status:triage, status:blocked |
priority: | How urgently is it needed? | priority:high |
| Label | Meaning |
|---|---|
good first issue | Well-scoped starter task — a good place to begin |
help wanted | Maintainers would welcome outside help |
needs-info | Waiting on more detail before work can continue |
status:blocked | Cannot proceed until an external dependency or decision changes |
![]() Salvydas Lukosius | ![]() onokatio | ![]() Omelet | ![]() Sai | ![]() William Cooper | ![]() Farzat07 |
![]() Sebastian | ![]() Callista Chang | ![]() signed-log | ![]() 0xMRTT |
![]() Colerar | ![]() Dongsen | ![]() nakayama900 | ![]() awarewen | ![]() Kazuma Miebori | ![]() syrinka |
![]() Benoit de Chezelles | ![]() Caleb Cushing | ![]() Kritiqual |
| Tag | Type |
|---|---|
| GH-R | GitHub release |
| COMP | Completion |
| ZS | Service |
| SC | Script |
| B | Build |
| RA | Rust Annex |
| THP | Themes/Prompts |
| Input signal | Used to recognize Zsh? | What happens |
|---|---|---|
| Explicit file path | Yes | The file is opened and parsed as Zsh. |
#!/usr/bin/env zsh shebang | No | It is ordinary source text to the parser. |
.zsh or .plugin.zsh extension | No | Extensions have no special meaning. |
| Extensionless function name | No automatic detection | It works when passed explicitly. |
| Directory path | No | Opening the directory fails; there is no recursive scan. |
| Standard input | No | The CLI requires one or more paths. |
| Profile | Use it for |
|---|---|
standalone-executable | A script launched as its own process. |
startup-file | Files such as .zshrc or .zprofile. |
sourced-library | Plugin entrypoints and libraries loaded into an existing shell. |
autoload-function | One function body loaded through Zsh autoload. |
test-fixture | Test inputs that should not inherit production lifecycle assumptions. |
| Letter | Capability | Requirement |
|---|---|---|
0 | provides the ZERO parameter | 1 |
f | supports the functions/ subdirectory | 2 |
b | supports the bin/ subdirectory | 3 |
u | calls the unload function | 4 |
U | provides @zsh-plugin-run-on-unload | 5 |
p | provides @zsh-plugin-run-on-update | 6 |
i | provides the zsh_loaded_plugins indicator | 7 |
P | provides the ZPFX global parameter | 8 |
s | provides PMSPEC itself, so it is always present | this requirement |
| Manager | PMSPEC |
|---|---|
| Zi | 0fuUpiPsX |
| Zinit | 0uUpiPsf |
| zcomet | 0fbuiPs |
| Flag | Description |
|---|---|
-h, --help | Print usage and exit |
-v, --version | Print version and exit |
-f, --fail-fast | Stop immediately after the first failure |
-t, --tap | Output results in TAP-compatible format (stdout) |
--verbose | Print full output from each test |
--output-text | Write a TAP-format text report to the output directory |
--output-html | Write an HTML report to the output directory |
--allow-risky | Suppress warnings for risky tests (tests with no assertions) |
--time-limit <n> | Set a per-test time limit of n seconds |
| Function | Exit code | Effect |
|---|---|---|
pass | 0 | Marks test as passed immediately |
fail <msg> | 1 | Marks test as failed with message |
error <msg> | 78 | Marks test as errored with message |
skip <msg> | 48 | Marks test as skipped with reason |
| File | Document format | Description |
|---|---|---|
| zi.zsh | adoc, pdf, html | The main script which is always loaded, in .zshrc |
| side.zsh | adoc, pdf, html | Functions, loaded by install.zsh and autoload.zsh scripts |
| install.zsh | adoc, pdf, html | Functions used only when installing a plugin or snippet |
| autoload.zsh | adoc, pdf, html | Functions used only in interactive Zi invocations |
| additional.zsh | adoc, pdf, html | Additional support for functions |
| Service | URL |
|---|---|
| Short URL | https://get.zshell.dev |
| GitHub RAW | https://raw.githubusercontent.com/z-shell/src/main/public/sh/install.sh |
| Service | URL |
|---|---|
| Short URL | https://init.zshell.dev |
| GitHub RAW | https://raw.githubusercontent.com/z-shell/src/main/public/zsh/init.zsh |
| Module name | Description |
|---|---|
| archive | Provides functions to list and extract archives. |
| autosuggestions | Integrates zsh-autosuggestions plugin into Prezto. |
| command-not-found | Loads the command-not-found tool on macOS or Debian-based distributions. |
| completion | Sets TAB completion and provides additional completions from the zsh-completions. |
| directory | Sets directory options and defines directory aliases. |
| dnf | Defines dnf aliases. |
| docker | Defines docker aliases and functions. |
| dpkg | Defines dpkg aliases and functions. |
| editor | Sets key bindings. |
| emacs | Enables Emacs dependency management. |
| environment | Sets general shell options and defines environment variables. |
| fasd | Maintains a frequently used file and directory list for fast access. |
| git | Enhances the Git by providing aliases, functions and by exposing repository status information to prompts. |
| gnu-utility | Provides for the interactive use of GNU utilities on non-GNU systems. |
| gpg | Provides for an easier use of GPG by setting up gpg-agent. |
| haskell | Enables local Haskell package installation. |
| helper | Provides helper functions for developing modules. |
| history-substring-search | Integrates zsh-history-substring-search into Prezto. |
| history | Sets history options and defines history aliases. |
| homebrew | Defines Homebrew aliases. |
| macports | Defines MacPorts aliases and adds MacPorts directories to path variables. |
| node | Provides utility functions for Node.js and loads npm completion. |
| ocaml | Initializes OCaml package management. |
| osx | Defines macOS aliases and functions. |
| pacman | Provides aliases and functions for the Pacman package manager and frontends. |
| perl | Enables local Perl module installation on macOS and defines aliases. |
| prompt | Loads prompt themes. |
| python | Enables local Python and local Python package installation. |
| rails | Defines Ruby on Rails aliases. |
| rsync | Defines rsync aliases. |
| ruby | Configures Ruby local gem installation, loads version managers, and defines aliases. |
| screen | Defines GNU Screen aliases and provides for auto launching it at start-up. |
| spectrum | Provides for easier use of 256 colors and effects. |
| ssh | Provides for an easier use of SSH by setting up ssh-agent. |
| syntax-highlighting | Integrates zsh-syntax-highlighting into Prezto. |
| terminal | Sets terminal window and tab titles. |
| tmux | Defines tmux aliases and provides for auto launching it at start-up. |
| utility | Defines general aliases and functions. |
| wakeonlan | This module provides a wrapper around the wakeonlan tool. |
| yum | Defines yum aliases. |
| Syntax | Description |
|---|---|
atinit'…' | loads the zsh/zprof module, shipped with Zsh, before loading the plugin – this starts the profiling. |
atload'…' | works after loading the plugin – shows profiling results zprof / head, unloads zsh/zprof - this stops the profiling. |
| Command | Description |
|---|---|
load '…' | Load plugin, can also receive absolute local path. |
light -b '…' | Light plugin load, without reporting/investigating. -b – investigate bindkey-calls only. 1 |
unload -q '…' | Unload plugin loaded with zi load …. -q – quiet. |
snippet -f URL | Source local (full path) or remote file (URL). -f – don't use cache (force re-download). 2 |
| Command | Description |
|---|---|
clist columns or completions columns | List completions in use, with columns completions per line. zi clist 5 will for example print 5 completions per line. Default is 3. |
cdisable '…' | Disable completion. |
cenable '…' | Enable completion. |
creinstall -q -Q '…' | Install completions for the plugin, can also receive absolute local path. -q – quiet. -Q - quiet all. |
cuninstall '…' | Uninstall completions for the plugin. |
csearch | Search for available completions from any plugin. |
compinit | Refresh installed completions. |
cclear | Clear stray and improper completions. |
cdlist | Show compdef replay list. |
cdreplay -q | Replay compdefs (to be done after compinit). -q – quiet. |
cdclear -q | Clear compdef replay list. -q – quiet. |
| Command | Description |
|---|---|
dtrace, dstart | Start investigating what's going on in the session. |
dstop | Stop investigating what's going on in the session. |
dunload | Revert changes recorded between dstart and dstop. |
dreport | Report what was going on in the session. |
dclear | Clear report of what was going on in the session. |
| Command | Description |
|---|---|
times -s -m -a | Statistics on plugin load times, sorted in order of loading. -s – use seconds instead of milliseconds. -m – show plugin loading moments and -a both. |
zstatus | Overall ZI status. |
report '…' --all | Show plugin report. --all – do it for all plugins. |
loaded | Show loaded plugins |
list keyword | Filter loaded plugins with only 'keyword' |
ls | List snippets in a formatted and colorized manner. Requires tree program. |
status '…' or URL --all | Git status for plugin. --all – do it for all plugins. |
recently time-spec | Show plugins that changed recently, the argument is e.g. 1 month 2 days. |
bindkeys | Lists bindkeys set up by each plugin. |
| Command | Description |
|---|---|
compile '…' --all | Compile plugin. --all – compile all plugins. |
uncompile '…' --all | Remove compiled version of the plugin. --all – do it for all plugins. |
compiled | List plugins that are compiled. |
| Command | Description |
|---|---|
self-update | Updates and compiles Zi. |
update -q -r '…' or --all | Update all plugins and snippets with --all – for quiet -q – execute git reset --hard before pulling changes with -r. |
ice '…' | Add ice to next command, argument e.g.: from"gitlab". |
delete '…' or --clean --all | Remove plugin or snippet from disk (good to forget wrongly passed ice-modifiers) --all – delete plugins and snippets that are not loaded with --clean. |
cd '…' | Jump into the plugin's directory. Also support snippets if fed with URL. |
edit '…' | Edit plugin's file with set $EDITOR. |
glance '…' | Look at plugin's source (pygmentize, source-highlight). |
stress '…' | Test plugin for compatibility with a set of options. |
changes '…' | View plugin's git log. |
create '…' | Create plugin (also together with GitHub repository). |
srv service-id {command} | Control a service, command can be: stop,start,restart,next,quit; next moves the service to another Z shell. |
recall '…' URL | Fetch saved ice modifiers and construct zi ice '…' command. |
env-whitelist -v -h {env..} | Allows to specify names or patterns of variables left unchanged during an unload – verbose -v – help -h. |
module | Manage binary Zsh module shipped with ZI, see zi module help. |
add-fpath fpath -f --front '…' sub-directory | Adds given plugin (not yet snippet) directory to $fpath. If the second argument is given, it is appended to the directory path. 3 |
run -l plugin {command} | Runs the given command in the given plugin's directory. 4 |
| Command | Description |
|---|---|
-h, help | Usage information. |
man | Manual. |
version, --version, or -V | Show the exact Git tag, the abbreviated commit for an untagged checkout, or unknown without Git metadata. |
| Hash Field | Default | Description |
|---|---|---|
ZI[HOME_DIR] | Legacy $HOME/.zi, otherwise XDG data zi | Where Zi should create all working directories |
ZI[BIN_DIR] | $ZI[HOME_DIR]/bin | Directory where Zi code resides |
ZI[COMPLETIONS_DIR] | $ZI[HOME_DIR]/completions | Completion working directory |
ZI[CACHE_DIR] | ${XDG_CACHE_HOME:-$HOME/.cache}/zi | Cache directory |
ZI[CONFIG_DIR] | ${XDG_CONFIG_HOME:-$HOME/.config}/zi | Directory for configuration files |
ZI[MAN_DIR] | $ZPFX/man | Directory to store manpages |
ZI[LOG_DIR] | $ZI[CACHE_DIR]/log | Directory to store log files |
ZI[PLUGINS_DIR] | $ZI[HOME_DIR]/plugins | Plugins working directory |
ZI[SNIPPETS_DIR] | $ZI[HOME_DIR]/snippets | Snippets working directory |
ZI[ZCOMPDUMP_PATH] | ${ZI[CACHE_DIR]}/.zcompdump | Path to .zcompdump file |
ZI[ZMODULES_DIR] | $ZI[HOME_DIR]/zmodules | Zsh modules working directory |
| ZPFX | $ZI[HOME_DIR]/polaris | Directory to store binary and related files |
| Hash Field | Default | Description |
|---|---|---|
ZI[OPTIMIZE_OUT_DISK_ACCESSES] | undefined | If set to 1, will skip checking if a turbo-loaded object exists on the disk. This option can give a performance gain of about 10 ms out of 150 ms (e.g: Zsh will start up in 140 ms instead of 150 ms). |
ZI[COMPINIT_OPTS] | undefined | Options for compinit call (e.g: done by zicompinit), commonly used with -C to speed up loading |
ZI[MUTE_WARNINGS] | undefined | If set to 1, mutes some warnings, specifically the plugin already registered warning |
ZI[PKG_OWNER] | z-shell | Owner of the packages (zi pack …) |
ZI[LOADER_HISTORY] | 1 | Loader only. Set to 0 before sourcing init.zsh to leave HISTFILE, SAVEHIST, and HISTSIZE entirely to your own configuration |
| Syntax | Description |
|---|---|
load'…' | Condition that when fulfilled will cause the plugin to be loaded. |
unload'…' | Same as above, but will unload the plugin. |
| Syntax | Description |
|---|---|
atload'!…' | Run the precmd hooks to make the prompts fully initialized when loaded in the middle of the prompt. |
precmd | Hooks are normally run before each new prompt. |
| Condition | Description |
|---|---|
![[ $PWD == *github* ]] | Change prompt after changing directory to *github*. |
![[ $MYPROMPT = 1 ]] | Change prompt when variable MYPROMPT = 1 is true. |
![[ … ]] | The exclamation mark causes the prompt to be reset after loading or unloading the plugin pick'/dev/null' – disable sourcing of the default-found file. |
multisrc'…' | Source multiple files. |
lucid | Don't show the under-prompt message that says e.g: Loaded geometry-zsh/geometry. |
nocd | Don't cd into the plugin's directory when executing the atload'…'. |
atload'…' | This ice can make the path that's displayed by the theme point to that directory. |
| Option | Effect |
|---|---|
-n | Do not append the normal +zi-message newline. |
-l | Join separate message operands with newlines instead of spaces. |
-u FD or -uFD | Write the complete message to file descriptor FD. |
--auto=off|safe|contextual | Select automatic formatting for this call. |
--color=auto|always|never | Select the color policy for this call. |
--level=plain|debug|info|warn|error|success | Apply a semantic base style. |
--literal | Disable all markup parsing while preserving the input bytes. |
-- | End option parsing. Use it before data that may begin with -. |
| Purpose | Tags |
|---|---|
| Commands and options | {cmd}, {bcmd}, {ice}, {opt}, {flag} |
| Objects and paths | {pname}, {pid}, {file}, {dir}, {url} |
| Data | {data}, {data2}, {num}, {time}, {version}, {var} |
| Status | {info}, {warn}, {error}, {failure}, {happy}, {note} |
| Quoting and emphasis | {apo}, {quo}, {bapo}, {b}, {u}, {it}, {faint} |
| Reset | {rst} |
| Tag | Output |
|---|---|
{nl} | Newline |
{tab} | Spaced tab |
{bspc} | Backspace |
{bar}, {th-bar} | Terminal-width horizontal rule |
{…}, {-…} | Ellipsis forms |
{ndsh}, {mdsh}, {mmdsh} | Dash forms |
{lr}, {↔} | Left-right marker |
| Syntax | Description |
|---|---|
wait | Load 0 seconds (about 5 ms exactly) after prompt (turbo mode). |
lucid | Silence the under-prompt messages ("Loaded {name of the plugin}"). |
light-mode | Load the plugin in light mode. 1. |
atpull'…' | Execute after updating the plugin – the command in the ice will install any new completions. |
atinit'…' | Execute code before loading plugin. |
atload'…' | Execute code after loading the plugin. |
zicompinit | Equals to autoload compinit; compinit. |
zicdreplay | Execute compdef … calls by plugins. More below 2. |
| Ice-modifier | Description |
|---|---|
as | Can be as"program" (alias: as"command"), and will cause to add script/program to $PATH instead of sourcing (see pick). Can also be as"completion" – use with plugins or snippets in whose only underscore-starting _* files you are interested in. 1 |
| id-as | Nickname a plugin or snippet, e.g. create a short handler for the long-URL snippet. |
teleid | Effective remote-ID (i.e.: URL, GitHub username/repo, package name, etc.). |
compile | Pattern (possible {…} expansion, like {a/*,b*}) to select additional files to compile, e.g. compile"(pure | async).zsh"forsindresorhus/pure. |
nocompile | Don't try to compile pick-pointed files. If passed the exclamation mark (i.e. nocompile'!'), then do compile, but after make'…' and atclone'…' (useful if Makefile installs some scripts, to point pick'…' at the location of their installation). |
service | Make the following plugin or snippet a service, which will run in the background, and only in a single Zshell instance. See #zservice topic. |
reset-prompt | Reset the prompt after loading the plugin/snippet (by issuing zle .reset-prompt). Note: normally it's sufficient to precede the value of wait'…' ice with !. |
| bindmap | To hold ;-separated strings like Key(s)A -> Key(s)B, e.g. ^R -> ^T; ^A -> ^B. In general, bindmap'…' changes bindings (done with the bindkey builtin) the plugin does. The example would cause the plugin to map Ctrl-T instead of Ctrl-R, and Ctrl-B instead of Ctrl-A. Does not work with snippets. |
| trackbinds | Shadow but only bindkey calls even with zi light …, i.e. even with investigating disabled (fast loading), to allow bindmap to remap the key-binds. The same effect has the zi light -b …, i.e. additional -b option to the light-subcommand. Does not work with snippets. |
| wrap | Takes a ;-separated list of function names to be investigated (meaning gathering report and unloading data) once during execution. It works by wrapping the functions with an investigating-enabling and disabling snippet of code. 2 |
aliases | Load the plugin with the aliases mechanism enabled. Use plugins that define and use aliases in their scripts. |
light-mode | Load the plugin without investigating, i.e., the same as the light command. Useful with the "for" syntax, where there is no load nor light subcommand |
| extract | Performs archive extraction supporting multiple formats like zip, tar.gz, etc., and OS X dmg images. 3 |
subst | Substitute the given string into another string when sourcing the plugin script, e.g.: zi subst'autoload → autoload -Uz' …. |
autoload | Autoload the given functions (from their files). Equivalent to calling atinit'autoload the-function'. Supports renaming of the function – pass '… → new-name' or '… -> new-name', e.g.: zi autoload'fun → my-fun; fun2 → my-fun2'. |
| Ice-modifier | Description |
|---|---|
proto | Change protocol to git,ftp,ftps,ssh, rsync, etc. The default is https. Does not work with snippets. |
| from | Clone plugin from a given site. Supported are from"github" (default), …"github-rel", …"gitlab", …"bitbucket", …"notabug" (short names: gh, gh-r, gl, bb, nb). Can also be a full domain name e.g: for GitHub enterprise. Does not work with snippets. |
ver | Used with from"gh-r" (i.e. downloading a binary release, e.g. for use with as"program") – selects which version to download. Default is latest, can also be explicit ver"latest". Works also with regular plugins, and checkouts e.g. ver"branch", i.e. a specific version. Does not work with snippets. |
bpick | Used to select which release from GitHub Releases to download, e.g. zi ice from"gh-r" as"program" bpick"*Darwin*"; zi load docker/compose. Does not work with snippets. |
depth | Pass --depth to git. I.e., limit how much history to download. Does not work with snippets. |
cloneopts | Pass the contents of cloneopts to git clone. Defaults to --recursive. I.e., change cloning options. Pass empty ice to disable recursive cloning. Does not work with snippets. |
pullopts | Pass the contents of pullopts to git pull used when updating plugins. Does not work with snippets. |
| Ice-modifier | Description |
|---|---|
| pick | Select the file to source, or the file to set as a command, when using snippet --command or the ice as"program". More below 4. |
| src | Specify an additional file to source after the main file or after setting up command via as"program". It is not a pattern but a plain filename. |
| multisrc | Allows specifying multiple files for sourcing, enumerated with spaces as the separators. More below 5. |
| Ice-modifier | Description |
|---|---|
| wait | Postpone loading a plugin or snippet. For wait'1', loading is done 1 second after the prompt. 6. |
| load | A condition to check which should cause the plugin to load. 7. |
| unload | A condition to check to cause the plugin to unload. More below 8. |
cloneonly | Don't load the plugin/snippet, only download it. |
if | Load plugin/snippet only when a given condition is true. Example: 9. |
has | Load plugin or snippet only when given command is available (in $PATH), e.g. zi ice has'git' …. |
subscribe | Postpone loading of a plugin or snippet until the given file(s) get updated, e.g. subscribe'{~/files-*,/tmp/files-*}'. |
trigger-load | Creates a function that loads the associated plugin/snippet, with an option. More below 10. |
| Ice-modifier | Description |
|---|---|
silent | Mute plugin's or snippet's stderr & stdout. Also, skip the loaded … message under the prompt for wait, etc. loaded plugins, and completion-installation messages. |
lucid | Skip loaded … message under prompt for wait, etc. loaded plugins (a subset of silent). |
notify | Output given message under-prompt after successfully loading a plugin/snippet. In case of problems with the loading, output a warning message and the return code. If starts with ! it will then always output the given message. Hint: if the message is empty, then it will just notify about problems. |
| Ice-modifier | Description |
|---|---|
blockf | Disallow plugin to modify fpath. Useful when a plugin wants to provide completions traditionally. Manage completions using Zi and block the plugins to expose them. |
nocompletions | Skip plugin completions detection and installation. Completions can be installed anytime using: zi creinstall {plugin-name}. |
| Ice-modifier | Description |
|---|---|
mv | Move file after cloning or update (only for new commits). Example: mv "fzf-* -> fzf". It uses -> as a separator for old and new file names. Also works with snippets. |
cp | Copy file after cloning or update (only for new commits). Example: cp "docker-c* -> dcompose". Ran after mv. |
| atclone | Run command after cloning, within plugin's directory, e.g. zi ice atclone"echo cloned". Ran also after downloading the snippet. |
| atpull | Run command after updating (only for new commits), within the plugin's directory. If starts with "!" then the command will be run before mv & cp ices and before git pull. Otherwise is run after mv & cp ices. Use the atpull'%atclone' to repeat atclone ice-modifier. |
| atinit | Run command after directory setup (cloning, checking, etc.) of the plugin/snippet before loading it. |
| atload | Run the given command within the plugin's directory after loading. Can be used with snippets. Passed code can be preceded with !, to be investigated (when using load, not light). |
run-atpull | Always run the atpull hook (when updating), not exclusively for new commits. |
nocd | Don't switch the current directory to the plugin's directory when evaluating the above ice-modifiers atinit'…', atload'…', etc. |
| make | Run the make command after cloning or updating and executing the mv, cp, atpull, atclone ice-modifiers. Can obtain argument, e.g. make"install PREFIX=/opt". If the value starts with ! then make is run before atclone and atpull ice-modifiers, e.g. make'!'. |
countdown | Causes an interruptive (Ctrl-C) countdown 5…4…3…2…1…0 to be displayed before executing atclone'…', atpull'…' and make ices-modifiers. |
reset | Invokes git reset --hard HEAD for plugins before pulling any new changes. This way git will not report conflicts if some changes were done by e.g.: atclone'…' ice-modifier. For file snippets and gh-r plugins, it invokes rm -rf *. |
| Ice-modifier | Description |
|---|---|
sh, !sh | Source the plugin's (or snippet's) script with sh emulation so that also all functions declared within the file will get a sticky emulation assigned and invoked with the sh emulation set-up. The !sh version switches additional options that are rather not important from the portability perspective. |
bash, !bash | The same as sh, but with the SH_GLOB option disabled, for "Bash" regular expressions to work. |
ksh, !ksh | The same as sh, but emulating the ksh shell. |
csh, !csh | The same as sh, but emulating the csh shell. |
| Syntax | Description |
|---|---|
as'program' | Add file selected by pick'…' to $PATH, and do not source it. |
atclone'…' | Execute code after downloading. |
atpull'%atclone' | Execute the same code atclone'…' is given, but after successful update. |
make | Run make after atclone'…' and atpull'…' (note: make'!' will execute before them). |
pick'src/vim' | Set the executable flag on src/vim, hint that src/ should be added to $PATH. |
| Syntax | Description |
|---|---|
as'program' | As above. |
atclone'…' | As above plus pass --prefix=$ZPFX to ./configure, to set the installation directory. |
atpull'%atclone' | As above. |
make | As above, but also run the install target. |
pick'src/vim' | as above, but for a different path $ZPFX/bin/vim. |
| Syntax | Description |
|---|---|
atclone'…' | Generate shell script, passing it to eval. More: 1 |
atpull'%atclone' | Do the same at any update of the plugin. More: 2 |
pick"clrs.zsh" | Source the previously generated file clrs.zsh. |
nocompile'!' | Invokes compilation after the atclone'…' and the exclamation mark causes this. |
atload'…' | Additionally sets up the Zsh completion to use the colors provided by the trapd00r package. |
| Syntax | Description |
|---|---|
make'!' | Compile direnv, the exclamation mark means: run the make first, before atclone'…' and atpull'…' hooks. |
atclone'…' | As soon as the plugin is installed generate the registration code and save it to zhook.zsh, instead of passing it to eval. |
atpull'%atclone' | The atclone'…' runs on installation while atpull'…' runs on update of the plugin. |
src'zhook.zsh' | Load generated registration code |
pick'direnv' | Ensure +x permission on the binary |
as'program' | The plugin is a program, there's no main file to the source. |
| Syntax | Description |
|---|---|
from'gh-r' | Install from direnv from GitHub Github releases. |
mv'direnv* -> direnv' | After installation, rename direnv.linux-386 or similar file to direnv. |
atclone'…', atpull'…' | Same above example. |
pick'direnv' | Same above example. |
as'program' | Same above example. |
| Ice name | Domain name / URL |
|---|---|
| ge | gitee.com |
| gitee | gitee.com |
| github | github.com |
| gh | github.com |
| gitlab | gitlab.com |
| gl | gitlab.com |
| notabug | notabug.org |
| nb | notabug.org |
| bitbucket | bitbucket.org |
| bb | bitbucket.org |
| github-rel | github.com/$remote_url_path/releases |
| gh-r | github.com/$remote_url_path/releases |
| cygwin | cygwin |
| Syntax | Description |
|---|---|
pick'…' | Provide the main file to the source - like *.sh, otherwise alphabetically first matched file is sourced. |
src'…' | Provide a second file to the source - not a pattern - plain file name. |
| Syntax | Execution moment |
|---|---|
atclone'…' | after cloning the associated plugin or snippet to the disk. |
atpull'…' | after updating the associated plugin or snippet. |
atinit'…' | before loading of the associated plugin or snippet. |
atload'…' | after loading of the associated plugin or snippet. |
| Ice modifier | Description |
|---|---|
| sbin | Creates shims for binaries and scripts. |
| fbin | Creates functions for binaries and scripts. |
| gem | Installs and updates gems + creates functions for gems binaries. |
| node | Installs and updates node_modules + creates functions for binaries of the modules. |
| pip | Installs and updates python packages into a virtualenv + creates functions for binaries of the packages. |
| fmod | Creates wrapping functions for other functions. |
| fsrc | Creates functions that source given scripts. |
| ferc | The same as fsrc, but using an alternate script-loading method. |
| Flag | Description |
|---|---|
g | Set $GEM_HOME variable to {plugin-dir}. |
n | Set $NODE_PATH variable to {plugin-dir}/node_modules. |
p | Set $VIRTUALENV variable to {plugin-dir}/venv. |
c | cd to the plugin's directory before running the program and then cd back after it has been run. |
N | Append &>/dev/null to the call of the binary, i.e. redirect both standard output and standard error to /dev/null. |
E | Append 2>/dev/null to the call of the binary, i.e. redirect standard error to /dev/null. |
O | Append >/dev/null to the call of the binary, i.e. redirect standard output to /dev/null. |
| Flag | Description |
|---|---|
-t --this-dir | Instructs Zi to look for shims in the current directory instead of $ZPFX/bin. |
-i --from-ices | Normally the code looks for the shim files by examining their contents (more info 1). |
-o --one-line | Display the list of shim files without line breaks, in a single line, after spaces. |
-s --short | Don't show the plugin/snippet that the shim belongs to. |
-h --help | Shows usage information. |
| Meta-plugin name | Consisting plugins |
|---|---|
| @annexes | bin-gem-node, readurl, patch-dl, rust, default-ice, unscope |
| @annexes+ | @annexes + submods, test |
| @console-tools | dircolors-material (package), fd, bat, hexyl, hyperfine, vivid, exa, ripgrep, tig |
| @developer-tools | color, revolver, zunit, gitignore.plugin.zsh, tig |
| @ext-git | git-open, git-recent, git-my, git-quick-stats, git-now, git-extras, forgit |
| @fuzzy | fzf (package), fzy (package), skim, peco |
| @fuzzy-src | fzf-go, fzy, skim-cargo, peco-go |
| @ohmyzsh-lib | OMZL::git, OMZL::history, OMZL::vcs_info, OMZL::clipboard, OMZL::completion, OMZL::theme-and-appearance, OMZL::prompt_info_functions, OMZL::termsupport, OMZL::key-bindings, OMZL::compfix, OMZL::directories, OMZL::functions |
| @prezto | PZTM::archive, PZTM::directory, PZTM::utility |
| @py-utils | pyenv (package) |
| @romkatv | powerlevel10k |
| @rust-utils | rust-toolchain, cargo-extensions |
| @sharkdp | fd, bat, hexyl, hyperfine, vivid |
| @z-shell | F-Sy-H, H-S-MW, zsh-diff-so-fancy |
| @z-shell+ | zsh-select, zconvey, zui, zflai |
| @zsh-users | zsh-syntax-highlighting, zsh-autosuggestions, zsh-completions |
| @zsh-users+fast | F-Sy-H, zsh-autosuggestions, zsh-completions, z-shell/zsh-fancy-completions |
| @zunit | color, revolver, zunit |
| Problem | Solution |
|---|---|
| (1) finding new plugins | The annex contains a curated, broad list of plugins, e.g.: all the console tools like fd, fzf, exa, ripgrep, etc., |
| (2) reconstructing the findings in new environments | It's easy to say and memorize e.g.: zi for console-tools – one label pulls a group of plugins and also the curated, optimal, default ice lists for each of them, |
| (3) constant increase of complexity of the commands | The provided, hopefully, best/optimal ices for each plugin are handled transparently and automatically; care is given to each ice list so that the plugin loads without any glitches (e.g.: without the "No files for compilation found." message and other, even such slight issues). |
| Benefit | Description |
|---|---|
| Plugin dependencies | The meta-plugins implement a dependency mechanism: selecting a from-source built ogham/exa will automatically pull in also the Rust compiler (available under the meta-plugin name: rust-toolchain). |
| Flexible disabling of chosen sub-plugins in any meta-plugin | A meta-plugin can contain many sub-plugins and it's possible to skip installing some of them by the skip'plugin-1 plugin-2…' ice, e.g.: zi skip'ripgrep fd' for console-tools. This way despite that some of the meta plugins are broad the user still has control over what's and how much is being installed. |
| Common from-source meta plugins | For the plugins that provide the binary programs it is often the case that a meta-plugin exists that'll build the program from the source (e.g.: fuzzy meta-plugin and its fuzzy-src counterpart). This might be handy e.g.: if there's no binary for our machine. |
| Flag | Description |
|---|---|
N | redirect both standard output and error to /dev/null |
E | redirect standard error to /dev/null |
O | redirect standard output to /dev/null |
c | change the current directory to the plugin's or snippet's directory before executing the command |
Set up rust and the lsd crate with a shim lsd exposing the binary:
zi ice rustup cargo'!lsd' zi load z-shell/0
Set up rust and the exa crate with a shim ls exposing the exa binary:
zi ice rustup cargo'!exa -> ls' zi load z-shell/0
Set up rust and the exa and lsd crates:
zi ice rustup cargo'exa;lsd' zi load z-shell/0
Set up rust, then the exa and lsd crates, with their binaries exposed by altering $PATH:
zi ice rustup cargo'exa;lsd' as"command" pick"bin/(exa|lsd)" zi load z-shell/0
Set up rust and then the exa crate with shim standard error redirected to /dev/null:
zi ice rustup cargo'!E:exa' zi load z-shell/0
Just install rust and make it available globally in the system:
zi ice id-as"rust" wait"0" lucid rustup as"command" pick"bin/rustc" atload="export \ CARGO_HOME=\$PWD RUSTUP_HOME=\$PWD/rustup" zi load z-shell/0
A little more complex rustup configuration that uses bin-gem-node annex and installs the cargo completion provided with rustup, using the for syntax:
zi id-as=rust wait=1 as=null sbin="bin/*" lucid rustup \
atload="[[ ! -f ${ZI[COMPLETIONS_DIR]}/_cargo ]] && zi creinstall rust; \
export CARGO_HOME=\$PWD RUSTUP_HOME=\$PWD/rustup" for \
z-shell/0| Short (Nick-) Name | GitHub ID / scoped ID |
|---|---|
| null | z-shell/null |
| z-a-readurl | z-shell/z-a-readurl |
| readurl | z-shell/z-a-readurl |
| rdurl | z-shell/z-a-readurl |
| z-a-patch-dl | z-shell/z-a-patch-dl |
| patch-dl | z-shell/z-a-patch-dl |
| z-a-submods | z-shell/z-a-submods |
| submods | z-shell/z-a-submods |
| z-a-rust | z-shell/z-a-rust |
| rust | z-shell/z-a-rust |
| z-a-bin-gem-node | z-shell/z-a-bin-gem-node |
| bin-gem-node | z-shell/z-a-bin-gem-node |
| bgn | z-shell/z-a-bin-gem-node |
| meta | z-shell/z-a-meta-plugins |
| metaplg | z-shell/z-a-meta-plugins |
| meta-plugins | z-shell/z-a-meta-plugins |
| archive | PZTM::archive |
| arch | PZTM::archive |
| directory | PZTM::directory |
| dir | PZTM::directory |
| environment | PZTM::environment |
| env | PZTM::environment |
| utility | PZTM::utility |
| util | PZTM::utility |
| fast-syntax-highlighting | z-shell/fast-syntax-highlighting |
| f-sy-h | z-shell/fast-syntax-highlighting |
| fsh | z-shell/fast-syntax-highlighting |
| history-search-multi-word | z-shell/history-search-multi-word |
| hsmw | z-shell/history-search-multi-word |
| zui | z-shell/zui |
| ZUI | z-shell/zui |
| zconvey | z-shell/zconvey |
| zconv | z-shell/zconvey |
| zbrowse | z-shell/zbrowse |
| zzcomplete | z-shell/zzcomplete |
| zzcomp | z-shell/zzcomplete |
| zzcom | z-shell/zzcomplete |
| zsh-autosuggestions | zsh-users/zsh-autosuggestions |
| autosuggestions | zsh-users/zsh-autosuggestions |
| autosug | zsh-users/zsh-autosuggestions |
| asug | zsh-users/zsh-autosuggestions |
| z-asug | zsh-users/zsh-autosuggestions |
| zsh-syntax-highlighting | zsh-users/zsh-syntax-highlighting |
| z-sy-h | zsh-users/zsh-syntax-highlighting |
| zsh-autocomplete | marlonrichert/zsh-autocomplete |
| autocomplete | marlonrichert/zsh-autocomplete |
| autocomp | marlonrichert/zsh-autocomplete |
| aucom | marlonrichert/zsh-autocomplete |
| acom | marlonrichert/zsh-autocomplete |
| z-aucom | marlonrichert/zsh-autocomplete |
| z-acom | marlonrichert/zsh-autocomplete |
| zsh-autopair | hlissner/zsh-autopair |
| autopair | hlissner/zsh-autopair |
| aupair | hlissner/zsh-autopair |
| aupa | hlissner/zsh-autopair |
| z-aupa | hlissner/zsh-autopair |
| evil-registers | zsh-vi-more/evil-registers |
| evil-reg | zsh-vi-more/evil-registers |
| vi-reg | zsh-vi-more/evil-registers |
| vireg | zsh-vi-more/evil-registers |
| vi-motions | zsh-vi-more/vi-motions |
| evil-mot | zsh-vi-more/vi-motions |
| vi-mot | zsh-vi-more/vi-motions |
| vimot | zsh-vi-more/vi-motions |
| vi-increment | zsh-vi-more/vi-increment |
| evil-inc | zsh-vi-more/vi-increment |
| vi-inc | zsh-vi-more/vi-increment |
| viinc | zsh-vi-more/vi-increment |
| vi-quote | zsh-vi-more/vi-quote |
| evil-qte | zsh-vi-more/vi-quote |
| vi-qte | zsh-vi-more/vi-quote |
| viqte | zsh-vi-more/vi-quote |
| directory-marks | zsh-vi-more/directory-marks |
| evil-dir-marks | zsh-vi-more/directory-marks |
| vi-dir-marks | zsh-vi-more/directory-marks |
| vi-dirma | zsh-vi-more/directory-marks |
| vidirma | zsh-vi-more/directory-marks |
| fd | sharkdp/fd |
| shark-fd | sharkdp/fd |
| bat | sharkdp/bat |
| shark-bat | sharkdp/bat |
| exa | ogham/exa |
| zsh-completions | zsh-users/zsh-completions |
| completions | zsh-users/zsh-completions |
| comps | zsh-users/zsh-completions |
| Package Name | Description |
|---|---|
| any-node | The any Node module(s) locally in a newly created plugin directory. |
| any-gem | The any Gem(s) locally in a newly created plugin directory. |
| apr | The Apache Portable Runtime (APR) library. |
| fzf | The fzf command-line fuzzy finder. |
| fzy | The fzy command-line fuzzy finder. |
| pyenv | The pyenv Python virtual environment manager. |
| remark | The remark Markdown processor. |
| doctoc | The doctoc Markdown processor. |
| ls_colors | The LS_COLORS and setup a zsh-completion system color scheme. |
| dircolors-material | The dircolors-material and set up a zsh-completion system color scheme. |
| asciidoctor | The asciidoctor Markdown processor. |
| system-completions | Moves the stock Zsh completions under the control of Zi. |
| brew-completions | The Homebrew Shell Completion under the control of Zsh & Zi. |
| ecs-cli | The AWS ECS CLI. |
| subversion | The Subversion client. |
| github-issues | The GitHub Issues client. |
| github-issues-srv | The GitHub Issues server. |
| firefox-dev | The Firefox Developer Edition. |
| zsh | The Zsh mirror of zsh-users. |
| nb | Bookmarking, and archiving with linking, tagging, search, Git syncing, Pandoc conversion, and more. |
| zsh-bin | Package of statically-linked, hermetic, relocatable - romkatv/zsh-bin. |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ✅ (default) | ❌ | ✅ | ❌ | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ❌ | ❌ | ❌ | ❌ | ✅ (default) |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ❌ | ✅ (default) | ❌ | ❌ | ❌ |
| Package source | Tarball | Binary | Git | Node | Gem |
| Status: | ❌ | ❌ | ✅ (default) | ❌ | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ❌ | ❌ | ❌ | ✅ (default) | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ❌ | ✅ (default) | ❌ | ❌ | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ✅ (default) | ✅ | ✅ | ❌ | ❌ |
| Package source: | Tarball | Binary | Git | Node | Gem |
| Status: | ✅ (default) | ❌ | ✅ | ❌ | ❌ |
| Package source: | Tarball | Git | Node | Gem |
| Status: | 🚫 | ✅ (default) | ❌ | ❌ |
| Package source: | Source Tarball | Git | Node | Gem |
| Status: | ✅ (default) | 🚫 | ❌ | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ✅ (default) | ❌ | ✅ | ❌ | ❌ |
| Package source: | Tarball | Git | Node | Gem |
| Status: | 🚫 | 🚫 | ✅ (default) | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ✅ (default) | ❌ | ✅ | ❌ | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ❌ | ❌ | ✅ (default) | ❌ | ❌ |
| Package source: | Source Tarball | Binary | Git | Node | Gem |
| Status: | ❌ | ❌ | ✅ (default) | ❌ | ❌ |
diff-so-fancy --colors
Configure git-diff to use diff-so-fancy and suggested colors:
diff-so-fancy --set-defaults
Use diff-so-fancy in patch mode (interoperable with git add --patch):
diff-so-fancy --patch
Configure git to use diff-so-fancy for all diff operations:
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFXS"
Configure git to use diff-so-fancy for git add --patch:
git config --global interactive.diffFilter "diff-so-fancy --patch"
Should the first block of an empty line be colored? (Default: true)
git config --bool --global diff-so-fancy.markEmptyLines false
Simplify git header chunks to a more human-readable format. (Default: true)
git config --bool --global diff-so-fancy.changeHunkIndicators false
Should the pesky + or - at the line start be removed? (Default: true)
git config --bool --global diff-so-fancy.stripLeadingSymbols false
By default, the separator for the file header uses Unicode line-drawing characters. If this is causing output errors on your terminal, set this to false to use ASCII characters instead. (Default: true)
git config --bool --global diff-so-fancy.useUnicodeRuler false
By default, the separator for the file header spans the full width of the terminal. Use this setting to set the width of the file header manually.
git config --global diff-so-fancy.rulerWidth 47 # git log's commit header width
| Form | Accepted values |
|---|---|
| Named | red, green, blue, yellow, cyan, magenta, black, white, or default |
| Indexed | 0 through 255 |
| Truecolor | Six-digit #rrggbb |
| Background | bg: before any named, indexed, or truecolor value |
| Attribute | bold, blink, conceal, reverse, standout, underline, each no- form, or none |
| Section | Style group |
|---|---|
[base] | General tokens, separators, diagnostics, and recursive input |
[command-point] | Commands, aliases, functions, keywords, and shell syntax |
[paths] | Paths, directories, separators, and globbing |
[brackets] | Paired brackets and nesting levels |
[arguments] | Options and quoted arguments |
[in-string] | Escapes and expansions inside strings |
[other] | Variables, assignments, and history expansion |
[math] | Arithmetic variables, numbers, and errors |
[for-loop] | Loop variables, numbers, operators, and separators |
[case] | Case inputs, parentheses, and conditions |
| Shorthand | Location |
|---|---|
CONFIG: | ${XDG_CONFIG_HOME:-$HOME/.config}/f-sy-h/ |
CACHE: | ${XDG_CACHE_HOME:-$HOME/.cache}/f-sy-h/ |
LOCAL: | /usr/local/share/f-sy-h/ |
HOME: | $HOME/.f-sy-h/ |
OPT: | /opt/local/share/f-sy-h/ |
| Entry | Meaning |
|---|---|
subcommands | A Zsh pattern, or ::function returning the patterns in reply |
subcmd:NULL | Nodes active before a recognized subcommand |
subcmd:<selector> | //-separated nodes active for one subcommand or a parenthesized | pattern |
subcmd:* | Catch-all nodes for recognized subcommands without a more specific entry |
subcmd-hook | A function called after a subcommand is recognized |
subcommands-blacklist | A comma-separated list of subcommands that return to the normal highlighter |
<LABEL>_<POSITION>_... | A node describing an option or positional argument |
| Value | Description |
|---|---|
reset-prompt-protect 1 | See all occurrences of a command together with surrounding commands |
page-size "8" | Number of entries to show (default is $LINES/3) |
page-size "LINES/4" | Pages size relative to screen height |
highlight-color "fg=yellow,bold" | Color to highlight matched, searched text (default bg=17 on 256-color) |
synhl "yes" | Whether to perform syntax highlighting (default true) |
active "underline" | Effect on active history entry. Try standout, bold, bg=blue (default underline) |
check-paths "yes" | Whether to check paths for existence and mark with magenta (default true) |
clear-on-cancel "no" | Whether pressing Ctrl+c or ESC should clearly enter query (default true) |
Use zle reset-prompt in sched calls, in the presence of z-shell/F-Sy-H, zsh-users/zsh-syntax-highlighting, zsh-users/zsh-autosuggestions, and other plugins that hook up into Z-Shell by overloading ZLE widgets.
For example, to refresh the clock in prompt every second:
PROMPT=%B%F{yellow}%D{%H:%M:%S}%B%b%f
schedprompt() {
zle && zle reset-prompt
sched +1 schedprompt
}
zmodload -i zsh/sched
schedpromptThe reset-prompt-protect zstyle needs to be set to 1 for correct cooperation with H-S-MW. Alternatively, you could use zle .reset-prompt (i.e. with the dot in front) to call the original, not an overloaded reset-prompt widget (created by z-shell/F-Sy-H, zsh-users/zsh-autosuggestions, etc.).
Syntax highlighting is customized via the HSMW_HIGHLIGHT_STYLES associative array. It has keys like reserved-word, alias, command, path, etc. which are assigned with strings like fg=blue,bold, to configure how given elements are to be colored. The complete list of available keys is at the beginning of hsmw-highlight.
If you assign this array in ~/.zshrc before or after loading H-S-MW you will change the defaults.
Sets path key – paths that exist will be highlighted with background magenta, foreground white, bold:
typeset -gA HSMW_HIGHLIGHT_STYLES HSMW_HIGHLIGHT_STYLES[path]="bg=magenta,fg=white,bold"
Enable coloring of options of the form "-o" and "--the option", with cyan:
typeset -gA HSMW_HIGHLIGHT_STYLES HSMW_HIGHLIGHT_STYLES[single-hyphen-option]="fg=cyan" HSMW_HIGHLIGHT_STYLES[double-hyphen-option]="fg=cyan"
Use 256 colors to highlight command separators (like ";" or "&&"):
HSMW_HIGHLIGHT_STYLES[commandseparator]="fg=241,bg=17"
Hash holding paths that shouldn't be grepped (globbed) – blacklist for slow disks, mounts, etc.:
typeset -gA FAST_BLIST_PATTERNS FAST_BLIST_PATTERNS[/mount/nfs1/*]=1 FAST_BLIST_PATTERNS[/mount/disk2/*]=1
| Value | Description |
|---|---|
| zstyle ":plugin:zconvey" check_interval "2" | How often to check if there are new commands (in seconds) |
| zstyle ":plugin:zconvey" expire_seconds "22" | If the shell is busy for 22 seconds, the received command will expire and not run |
| zstyle ":plugin:zconvey" greeting "logo" | Display logo at Zsh start ("text" – display text, "none" – no greeting) |
| zstyle ":plugin:zconvey" ask "0" | The zc won't ask for missing data ("1" has the same effect as always using -a option) |
| zstyle ":plugin:zconvey" ls_after_rename "0" | Don't execute zc-ls after doing rename (with zc-rename or zc-take) |
| zstyle ":plugin:zconvey" use_zsystem_flock "1" | Should use a faster zsystem's flock when it's possible? (default true) |
| zstyle ":plugin:zconvey" output_method "feeder" | To put commands on the command line, ZConvey can use the small program "feeder" or "zsh" method, which currently doesn't automatically run the command – to use when e.g. feeder doesn't build (unlikely) or when occurring any problems with it |
| zstyle ":plugin:zconvey" timestamp_from "datetime | Use zsh/datetime module for obtaining timestamp. "date" – use date command (fork) |
| Command | Description |
|---|---|
zc | Sends to another session; use the -a option to be asked for a target and a command to send |
zc-ls | Lists all active and named sessions |
zc-id | Shows ID and NAME of current session |
zc-all | The same as zc, but targets are all other active sessions (with -f also busy sessions) |
zc-take | Takes a name for current or selected sessions, schematically renames any conflicting sessions |
zc-logo | The same as zc-id, but in a form of an on-screen logo; bound to Ctrl-O, Ctrl-I |
zc-rename | Assigns a name to a current or selected session; won't rename if there's a session with the same name |
zc-bg-notify | In subdirectory cmds, link it to /usr/local/bin, etc. or load with e.g. Zi |
| Key(s) | Description |
|---|---|
| Ctrl-U ,Ctrl-D | Half page up; half page down |
| Ctrl-P ,Ctrl-N | Previous line, centered; next line, centered |
| Ctrl-L | Redraw of whole display |
| [ , ] | Jump to next and previous section (e.g.: next plugin or snippet) |
| g , G | Jump to beginning and end of whole interface |
| < ,> or { ,} | Horizontal scroll (i.e.: left or right) |
| / | Show incremental search |
| F1 | Jump to result (in incremental search) and back |
| Esc | Exit incremental search, clearing query |
| Ctrl-W | Delete whole word (in incremental search) |
| Ctrl-K | Delete whole line (in incremental search) |
| Key(s) | Description |
|---|---|
| Ctrl+T | Start Zsh Command Architect (Zshell binding) |
| Enter | Delete selected segment (command window) or add selected segment (history window) |
| [ or ] | Move active segment (when in command window) |
| Shift+left or Shift+right | Move active segment (when in command window) |
| Tab | Switch between the two available windows |
| g, G | Beginning and end of the list |
| / | Start incremental search |
| Esc | Exit incremental search, clearing filter |
| <,>, {,} | Horizontal scroll |
| Ctrl+L | Redraw of whole display |
| Ctrl+O, o | Enter uniq mode (no duplicate lines) |
| Ctrl+W | (in incremental search) - delete whole word |
| Ctrl+K | (in incremental search) - delete whole line |
| Ctrl+D, Ctrl+U | Half page up or down |
| Ctrl+P, Ctrl+N | Previous and next (also done with vim's j,k) |
If TERM=screen-256color (often a case for tmux and screen sessions) then ncv terminfo capability will have 2nd bit set. This in general means that underline won't work. To fix this by creating your own ncv=0-equipped terminfo file, run:
{ infocmp -x screen-256color; printf '\t%s\n' 'ncv@,'; } > /tmp/t && tic -x /tmp/tA file will be created in directory ~/.terminfo and will be automatically used, tmux and screen will work. Similar is for Linux virtual terminal:
{ infocmp -x linux; printf '\t%s\n' 'ncv@,'; } > /tmp/t && tic -x /tmp/tIt will not display underline properly, but will instead highlight by a color, which is quite nice. The same will not work for FreeBSD's vt, ZCA will detect if that vt is used and will revert to highlighting elements via reverse mode.
| Keys | Description |
|---|---|
| Alt+w | Delete a shell word 1 |
| Alt+t | Transpose (swap) shell words |
| Alt+m | Copy previous shell word, or word before that, etc. when used multiple times |
| Alt+M | Just copy previous shell word without iterating to previous ones |
| Alt+. | Copy last shell word from previous line, or line before that, etc. when used multiple times; can be combined with Alt+m |
| Ctrl+W | Delete word according to configured word style 2: |
| Alt+r | Transpose (swap) words according to configured word style (cursor needs to be placed on beginning of word to swap) |
| Alt+/ | Complete some word 3 from history |
| Alt+h, Alt+H | Complete shell word from history (custom version) |
| Alt+J | Break line |
| Alt+_ | Undo |
To make Alt key work like expected under XTerm add XTerm*metaSendsEscape: true to your resource file, e.g.:
echo 'XTerm*metaSendsEscape: true' >> ~/.Xresources
To make Alt key work like expected under Konsole add Konsole*keysym.Meta: Meta to your resource file, e.g.:
echo 'Konsole*keysym.Meta: Meta' >> ~/.config/konsolerc
| Mode | Median | p95 |
|---|---|---|
| Plain source | 11.564 ms | 13.331 ms |
| zpmod first run | 13.378 ms | 15.495 ms |
| zpmod warm | 4.082 ms | 4.210 ms |
Manual .zwc | 3.760 ms | 3.880 ms |
| Function | Description |
|---|---|
n-aliases | Aliases, relegates editing to vared |
n-cd | Dir stack and bookmarked directories, allows entering the selected directory |
n-functions | Functions, relegates editing to zed or vared |
n-history | History, allows to edit and run commands from it |
n-kill | Processes list, allows sending a signal to the selected process |
n-env | Environment, relegates editing to vared |
n-options | Options, allows toggling their state |
n-panelize | Loads the output of a given command into the list for browsing |
| Key(s) | Description |
|---|---|
| H, ? | (from n-history) - run n-help |
| Ctrl-R | Start n-history, the incremental, multi-keyword history searcher (Zsh binding) |
| Ctrl-A | Rotate entered words (1+2+3 -> 3+1+2) |
| Ctrl-F | Fix mode (approximate matching) |
| Ctrl-L | Redraw of whole display |
| Ctrl-T | Browse themes (next theme) |
| Ctrl-G | Browse themes (previous theme) |
| Ctrl-U | Half page up |
| Ctrl-D | Half page down |
| Ctrl-P | Previous element (also done with vim's k) |
| Ctrl-N | Next element (also done with vim's j) |
| [, ] | Jump directory bookmarks in n-cd and typical signals in n-kill |
| g, G | Beginning and end of the list |
| / | Show incremental search |
| F3 | Show/hide incremental search |
| Esc | Exit incremental search, clearing filter |
| Ctrl-W (in incremental search) | Delete whole word |
| Ctrl-K (in incremental search) | Delete whole line |
| Ctrl-O, o | Enter uniq mode (no duplicate lines) |
| Ctrl-E, e | Edit private history (when in private history view) |
| F1 (in n-history) | Switch view |
| F2, Ctrl-X, Ctrl-/ | Search predefined keywords (defined in config files) |