promptress

Crates.iopromptress
lib.rspromptress
version0.2.3
sourcesrc
created_at2019-11-23 02:01:58.8329
updated_at2024-02-12 20:07:52.567131
descriptionLightning-fast, customizable terminal prompt
homepagehttps://github.com/j-tai/promptress
repositoryhttps://github.com/j-tai/promptress
max_upload_size
id183656
size79,936
Jasmine Tai (j-tai)

documentation

https://github.com/j-tai/promptress/wiki

README

promptress

A lightning-fast, customizable prompt

promptress

Having a very fast prompt is more important than you might think. If your prompt takes half a second to render, then you must wait for it before you can type your next command. These half-seconds can add up.

Fortunately, promptress takes less than 5 ms to render (but YMMV).

Features

  • Lightning fast
  • Shows the exit code of the last command
  • Shows the current working directory
  • Shows the current Git branch

Installing

You can install this project with Cargo:

$ cargo install promptress

This will download promptress from crates.io, build it, and install it.

Getting started

First, you will need a configuration file for promptress. You can start off with just an empty file (which is a valid config) and add more to it later.

$ > ~/.promptress.toml

Now, you can set your $PS1:

PS1='$(PROMPTRESS_EXIT_CODE=$? promptress)'

You can add the above line to your ~/.bashrc to make the change permanent.

To tweak the colours, add a Git branch display, and more, see Configuration guide.

License

GNU General Public License version 3.

Commit count: 41

cargo fmt