Crates.io | promptress |
lib.rs | promptress |
version | 0.2.3 |
source | src |
created_at | 2019-11-23 02:01:58.8329 |
updated_at | 2024-02-12 20:07:52.567131 |
description | Lightning-fast, customizable terminal prompt |
homepage | https://github.com/j-tai/promptress |
repository | https://github.com/j-tai/promptress |
max_upload_size | |
id | 183656 |
size | 79,936 |
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).
You can install this project with Cargo:
$ cargo install promptress
This will download promptress from crates.io, build it, and install it.
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.