A minimal and fast shell prompt written in Rust.
cargo install mshp
PATH
On most POSIX compatible shells you can add the following line to your init file (e.g. .bashrc
):
sh
PS1="$(mshp)"
Add the following to your .zshrc
file:
zsh
precmd() {
PS1="$(mshp)"
}
Add the following to your .config/ion/initrc
file:
ion
fn PROMPT
echo -n "$(mshp)"
end
mshp
can be configured via environment variables.
Variables ending with _COLOR
take a string as value that can be one of the following:
default
or empty (sets the color to the default foreground color defined by the terminal)black
, red
, green
, yellow
, blue
, magenta
, cyan
, white
)1
for red)#
(e.g. #00F
or #0000FF
for blue)The following environment variables are available:
Note: The values represent the default values that are used if the environment variable is not set
```sh
MSHPCWDCOLOR="blue"
MSHPGITBRANCH_ICON="î‚ "
MSHPGITBRANCH_COLOR="cyan"
1
will activate this setting.MSHPGITBRANCH_DISABLE=0
MSHPGITSTAGED_ICON="+"
MSHPGITUNSTAGED_ICON="!"
MSHPGITUNTRACKED_ICON="?"
MSHPGITAHEAD_ICON="↥"
MSHPGITBEHIND_ICON="↧"
MSHPGITSTATUS_COLOR="cyan"
#
1
will activate this setting.MSHPGITSTATUS_DISABLE=0
MSHPUSERINDICATOR="$"
MSHPROOTINDICATOR_COLOR="green"
MSHPROOTINDICATOR="#"
MSHPROOTINDICATOR_COLOR="green" ```
Licensed under either of [Apache License, Version 2.0] or [MIT License] at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.