~fmac/androsace

a0f04230b71a938e92670cc1a5b36f7592ea66e2 — Francesco Camuffo 3 months ago 1b900de main
README.md: write usage
1 files changed, 60 insertions(+), 0 deletions(-)

M README.md
M README.md => README.md +60 -0
@@ 1,3 1,63 @@
# 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](http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html) 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.