Skip to content

tauyoungsama/zsh-prompt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A custom Zsh prompt style

This is a Zsh prompt style for my own use, inspired by Oh My Zsh built-in theme fox and a popular Zsh theme Powerlevel10k.

To activate the prompt, source prompt.zsh in your .zshrc.

Features

Prompt Example Bright Prompt Example Dark

The prompt

  • Is in a colorful style.
  • Always shows the current user, working directory and time.
  • Hides hostname when working locally.
  • Shows git status when in a git repo.
  • Shows virtualenv name when in a virtualenv.
  • Shows the exit code when the last command returns an error.
  • Truncates path when the prompt is too long.

Dependencies

The prompt uses gitstatus by romkatv to acquire git status. You need to install it yourself.

With Homebrew:

brew install romkatv/gitstatus/gitstatus
source $(brew --prefix gitstatus)/gitstatus.prompt.zsh

Or manually:

git clone --depth=1 https://github.com/romkatv/gitstatus.git ~/gitstatus
source ~/gitstatus/gitstatus.prompt.zsh

Edit prompt.zsh to correctly source the plugin.

Update log

  • 2024/4/20: Added an optional one-line style. Set PROMPT_ONE_LINE to enable.

About

A custom Zsh prompt style

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages