https://github.com/xcambar/purs
A Pure-inspired prompt in Rust
https://github.com/xcambar/purs
Last synced: 8 months ago
JSON representation
A Pure-inspired prompt in Rust
- Host: GitHub
- URL: https://github.com/xcambar/purs
- Owner: xcambar
- License: mit
- Created: 2017-10-17T20:30:56.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-15T23:37:48.000Z (almost 6 years ago)
- Last Synced: 2025-03-29T08:08:21.433Z (8 months ago)
- Language: Rust
- Size: 69.3 KB
- Stars: 254
- Watchers: 7
- Forks: 34
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - purs - A fast [pure](https://github.com/sindresorhus/pure)-inspired prompt written in [Rust](https://www.rust-lang.org/). (Themes / ZSH on Windows)
- fucking-awesome-zsh-plugins - purs - A fast <b><code> 13881â</code></b> <b><code> 997đ´</code></b> [pure](https://github.com/sindresorhus/pure))-inspired prompt written in đ [Rust](www.rust-lang.org/). (Themes / ZSH on Windows)
- awesome-zsh-plugins - purs - A [Pure](https://github.com/sindresorhus/pure)-inspired prompt written in [Rust](https://www.rust-lang.org/). (Themes / Zinit (nÊe zplugin))
README
# Purs
[](https://travis-ci.org/xcambar/purs)
A [Pure](https://github.com/sindresorhus/pure)-inspired prompt in [Rust](https://www.rust-lang.org/).
Even more minimal, definitively faster and at least as pretty as the original Pure by [Sindre Sohrus](https://github.com/sindresorhus).

## Installation â Usage
1. Set up your Rust environment (use a Nightly build)
1. `$ cargo build --release`
1. Add the following to your ZSH configuration:
```
function zle-line-init zle-keymap-select {
PROMPT=`/PATH/TO/PURS/target/release/purs prompt -k "$KEYMAP" -r "$?" --venv "${${VIRTUAL_ENV:t}%-*}"`
zle reset-prompt
}
zle -N zle-line-init
zle -N zle-keymap-select
autoload -Uz add-zsh-hook
function _prompt_purs_precmd() {
/PATH/TO/PURS/target/release/purs precmd
}
add-zsh-hook precmd _prompt_purs_precmd
```
## Why?
1. Learn some Rust
1. My Pure prompt felt slow on large repos (and indeed, was, compared to Purs)
1. Learn some Rust
## Questions
* I don't like...?
It's a pet project with wide areas for optimization and enhancement.
I'm really open to discussions, PRs a plus.
* Why doesn't it have...?
It's a pet project with wide areas for optimization and enhancement.
I'm really open to discussions, PRs a plus.
# License
MIT, see LICENSE file.