Skip to content
This repository has been archived by the owner on Aug 18, 2024. It is now read-only.
/ turs Public archive

A minimalistic Purs-inspired prompt for zsh 🐚🔥

License

Notifications You must be signed in to change notification settings

eikendev/turs

Repository files navigation

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.

Screenshot

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.

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