Turs is a Purs-inspired prompt. I love to keep things simple, and this prompt gives me everything I need.
Important
This project is no longer maintained. Although I'm still holding the "turs" package name on crates.io, if you need it or are interested in taking over, please reach out.
- Install using
$ cargo install turs
- Add Cargo binaries to your
$PATH
environment variable - Add the following snippet to your ZSH configuration:
autoload -Uz add-zsh-hook
function _prompt_turs_precmd() {
turs precmd
}
function _prompt_turs_prompt() {
PROMPT=`turs prompt -k "$KEYMAP" -r "$?"`
}
function _prompt_turs_rprompt() {
RPROMPT=`turs rprompt`
}
function zle-line-init zle-keymap-select {
_prompt_turs_prompt
_prompt_turs_rprompt
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
_prompt_turs_prompt
_prompt_turs_rprompt
add-zsh-hook precmd _prompt_turs_precmd
cargo install turs