~fmac/androsace

Shell prompt segments in Hare
a0f04230 — Francesco Camuffo 3 months ago
README.md: write usage
1b900deb — Francesco Camuffo 3 months ago
add seg username
e571e2be — Francesco Camuffo 3 months ago
add seg unixtime

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~fmac/androsace
read/write
git@git.sr.ht:~fmac/androsace

You can also use your local clone with git send-email.

#androsace

Simple shell prompt generator in Hare.

#Usage

Androsace expects 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.


Available segments at the moment are:

  • cwd
  • hostname
  • tail
  • unixtime
  • username

Here is an example.

PS1='$(androsace \
	username \
	"@" hostname \
	" $? " \
	cwd " " \
	"[" unixtime "]" \
	tail " ")'

Which outputs:

fmac@maze 0 ~ [1643226483]
$ 

#Install

make
make install

#Contributing

Shoot me emails full of patches.