ref: 6e2898222b4c631c4f8e8f56735746c8a2c8effe corylus/README.md -rw-r--r-- 905 bytes
6e289822 — Francesco Camuffo Say how to install the program 6 months ago


Simple shell prompt generator in Go.


Corylus expects strings as arguments. If an argument matches the name of a known segment generator, then the result will be appended. If an argument does not match any generator then it is appended as string.

Edit the prompt variable in your shell configuration file, probably .bashrc, .zshrc or .profile. For ZSH you may need to enable the prompt expansion by adding setopt PROMPT_SUBST to your .zshrc.

At the moment the available segments are:

  • hostname
  • username
  • cwd
  • tail

Here is an example with some colors.

PS1='$(corylus \
	"[" hostname "] " \
	"\033[34m" username "\033[0m " \
	"\033[35m" cwd "\033[0m" \

Which outputs with this format:

[myhost] myname ~


go get git.sr.ht/~fmac/corylus