Skip to content

xcambar/purs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purs

Build Status

A Pure-inspired prompt in Rust.

Even more minimal, definitively faster and at least as pretty as the original Pure by Sindre Sohrus.

Screenshot of Purs in action

Installation — Usage

  1. Set up your Rust environment (use a Nightly build)
  2. $ cargo build --release
  3. 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
  2. My Pure prompt felt slow on large repos (and indeed, was, compared to Purs)
  3. 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.