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 |
#250 in Command-line interface
21 downloads per month
30KB
769 lines
promptress
A lightning-fast, customizable prompt
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
Dependencies
~10–21MB
~312K SLoC