Minimal, fast and elegant ZSH prompt. Displays the right information at the right time.
Features:
- sleek look
- asynchronous git information display using git-radar
- the prompt symbol is colored red, when all asynchronous tasks are finished it turns white
- exit code of last command if the exit code is not zero
- runtime of executed command if it exceeds a threshold
- username and host name if connected to a ssh server
With all information (connected to ssh server, runtime and exit status from last command):
- zsh
Choose one of the methods below.
antigen bundle mgee/slimline
zgen load mgee/slimline
Clone the repository:
git clone --recursive https://github.com/mgee/slimline.git
Source the prompt in your .zshrc
(or other appropriate) file:
source <path-to-slimline>/slimline.zsh
Defines the symbol of the prompt. Default is ∙
.
Defines the symbol of the exit status glyph. Default is ↵
.
Defines whether git-radar shall be used to display git information. Default is 1
.
Defines whether git-radar shall perform a git fetch
automatically (default: every 5 minutes) for the current git repository (on prompt rendering). Default is 1
.
Defines whether the runtime of a process is displayed if it exceeds the maximum execution time specified by the option below. Default is 1
.
Defines the maximum execution time of a process until its run time is displayed on exit. Default is 5
seconds.
Defines whether the exit status is displayed if the exit code is not zero. Default is 1
.
Defines whether the user@host
part is displayed if connected to a ssh server. Default is 1
.
Git Radar allows customizing the output format via the GIT_RADAR_FORMAT
environment variable.
See this page for details.
Slimline uses a custom format for Git Radar output. However, if you set a custom
format via GIT_RADAR_FORMAT
before sourcing Slimline this format will be used instead.
Git Radar colors can be configured via environment variables. See this page for details.
Note: Use %F{color}
to specify the color.
For example to color the branch name yellow use this line in your zsh configuration:
export GIT_RADAR_COLOR_BRANCH="%F{yellow}"
Git Radar can automatically perform a git fetch
, see option SLIMLINE_PERFORM_GIT_FETCH
.
The interval of the fetch can be customized using the environment variable GIT_RADAR_FETCH_TIME
.
See this page for details.
Released under the MIT License