https://github.com/eikendev/turs
A minimalistic Purs-inspired prompt for zsh :shell::fire:
https://github.com/eikendev/turs
prompt zsh
Last synced: 8 months ago
JSON representation
A minimalistic Purs-inspired prompt for zsh :shell::fire:
- Host: GitHub
- URL: https://github.com/eikendev/turs
- Owner: eikendev
- License: mit
- Created: 2019-04-05T19:09:26.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-10-21T21:59:19.000Z (about 2 years ago)
- Last Synced: 2024-04-26T04:20:25.739Z (over 1 year ago)
- Topics: prompt, zsh
- Language: Rust
- Homepage: https://crates.io/crates/turs
- Size: 94.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - turs - Fast, minimal [Purs](https://github.com/xcambar/purs)-inspired prompt. (Themes / ZSH on Windows)
- fucking-awesome-zsh-plugins - turs - Fast, minimal <b><code> 260⭐</code></b> <b><code> 34🍴</code></b> [Purs](https://github.com/xcambar/purs))-inspired prompt. (Themes / ZSH on Windows)
README
[](https://github.com/eikendev/turs/actions)
[](https://crates.io/crates/turs)
[](https://crates.io/crates/turs)
[](https://crates.io/crates/turs)
## About
Turs is a [Purs](https://github.com/xcambar/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.
## Usage
1. Install using `$ cargo install turs`
1. Add Cargo binaries to your `$PATH` environment variable
1. Add the following snippet to your ZSH configuration:
```zsh
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
```bash
cargo install turs
```