Shibuichi

A custom zsh prompt expander written in rust.

Shibuichi handles a superset of zsh prompt expansions. Standard zsh prompt expansions are left alone, and this just adds several other expansions, substituting them on the fly:

Installation

cargo install shibuichi

Usage

Replace your zsh PROMPT precmd by processing it with shibuichi first. This then allows you to use the expanded escape sequences.

For example:

precmd() { PROMPT="$(shibuichi ' %r %# ')" }

creates a simple prompt that shows your git branch.

My current prompt is: %F{white}%K{black}%(?.%1(j.   .). %1(j..)  ) %n@%m %F{black}%K{blue}%F{black} %~ %F{blue}%(G.%(y.%K{yellow}.%K{green})%F{black} %0(o..)%1(o..)%2(o..)%3(o..)%4(o.ﴃ.)%1(p. .%1(q. .%1(x. .)))%1(p.%2(p.%3(p.%p.).).)%1(q.%2(q.%3(q.%q.).).)%1(x.%2(x.%3(x.%x.).).) %r%(m. .%(s. .))%(m..)%(s..) %(y.%F{yellow}.%F{green}).)%k%f

Design

This was designed to be as agnostic to prompt style as possible. In particular, this shouldn't make any choices about layout preferences, and instead seek to provide manipulable output.

To Do

Naming

Shibuichi is an alloy of silver and copper because this was inspired by silver.