~fmac/androsace

Shell prompt segments in Hare

a0f0423 README.md: write usage

~fmac pushed to ~fmac/androsace git

1 year, 3 months ago

4d10e75 README.md: write usage

~fmac pushed to ~fmac/androsace git

1 year, 4 months ago

#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.