turs

Crates.ioturs
lib.rsturs
version0.1.0
sourcesrc
created_at2020-02-16 19:01:00.778666
updated_at2023-10-08 21:52:51.627529
descriptionA Purs-inspired prompt
homepagehttps://github.com/eikendev/turs
repositoryhttps://github.com/eikendev/turs.git
max_upload_size
id209853
size30,743
eikendev (eikendev)

documentation

README

Build status License Version Downloads

About

Turs is a Purs-inspired prompt. I love to keep things simple, and this prompt gives me everything I need.

Usage

  1. Install using $ cargo install turs
  2. Add Cargo binaries to your $PATH environment variable
  3. 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

Installation

From crates.io

cargo install turs
Commit count: 45

cargo fmt