5 releases

0.2.3 Feb 12, 2024
0.2.2 Aug 21, 2020
0.2.1 Jan 2, 2020
0.2.0 Dec 11, 2019
0.1.0 Nov 23, 2019

#90 in Command-line interface

GPL-3.0-or-later

30KB
769 lines

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.

Dependencies

~12–23MB
~375K SLoC