All Projects → laggardkernel → spacezsh-prompt

laggardkernel / spacezsh-prompt

Licence: MIT license
Spacezsh: async prompt does things in the ZSH way

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to spacezsh-prompt

rafiki-zsh
👀👻 A zsh friend to watch over you.
Stars: ✭ 50 (+233.33%)
Mutual labels:  zsh-theme, oh-my-zsh-theme
Starship
☄🌌️ The minimal, blazing-fast, and infinitely customizable prompt for any shell!
Stars: ✭ 20,504 (+136593.33%)
Mutual labels:  zsh-theme, zsh-prompt
zsh
(๑•̀ㅂ•́)و✧ Easily configure zsh themes and plugins for GNU/Linux and Android-Termux.管理数百个zsh插件和主题,支持Alpine,Android,Arch,Debian,Fedora和Void。
Stars: ✭ 73 (+386.67%)
Mutual labels:  zsh-theme, zinit
apollo-zsh-theme
Heavily customizable, compatible, and fast ZSH theme framework.
Stars: ✭ 64 (+326.67%)
Mutual labels:  zsh-theme, zsh-prompt
guezwhoz-zsh-theme
Minimalistic .zshrc config contains all of the settings required for comfortable terminal use ...
Stars: ✭ 30 (+100%)
Mutual labels:  zsh-theme, oh-my-zsh-theme
guri
A simple and fast Oh-My-Zsh theme
Stars: ✭ 19 (+26.67%)
Mutual labels:  zsh-theme, oh-my-zsh-theme
Awesome Zsh Plugins
A collection of ZSH frameworks, plugins, themes and tutorials.
Stars: ✭ 10,129 (+67426.67%)
Mutual labels:  zsh-theme, zsh-prompt
Spaceship Prompt
🚀⭐ A Zsh prompt for Astronauts
Stars: ✭ 15,748 (+104886.67%)
Mutual labels:  zsh-theme, spaceship
Cloudy
Minimal cloudy ☁️ zsh theme
Stars: ✭ 28 (+86.67%)
Mutual labels:  zsh-theme, oh-my-zsh-theme
bureau
💻 Informative and fast ZSH prompt with git status. Works well with HUGE repositories. Show username, hostname, path, git branch and status.
Stars: ✭ 27 (+80%)
Mutual labels:  zsh-theme, zsh-prompt
Alien Minimal
An asynchronous minimal zsh prompt
Stars: ✭ 122 (+713.33%)
Mutual labels:  zsh-theme
Jovial
jovial - a jovial theme for zsh
Stars: ✭ 124 (+726.67%)
Mutual labels:  zsh-theme
windows-zsh-theme
A simple zsh theme to emulate Windows Command Prompt
Stars: ✭ 31 (+106.67%)
Mutual labels:  zsh-theme
dotfiles
⚫️ ~ is where the ♥ is - my dotfiles.
Stars: ✭ 94 (+526.67%)
Mutual labels:  zsh-theme
Polyglot
Color, ASCII-only Git prompt for zsh, bash, ksh93, mksh, pdksh, dash, and busybox ash
Stars: ✭ 118 (+686.67%)
Mutual labels:  zsh-theme
Pi
A minimalist zsh theme with git status decorations
Stars: ✭ 76 (+406.67%)
Mutual labels:  zsh-theme
filthy
A disgustingly clean ZSH prompt
Stars: ✭ 38 (+153.33%)
Mutual labels:  zsh-theme
Dotfiles
What tools and plugins I use for web development?
Stars: ✭ 73 (+386.67%)
Mutual labels:  zsh-theme
bliss-zsh
A delicate Zsh theme that injects color without overwhelming your workspace
Stars: ✭ 20 (+33.33%)
Mutual labels:  oh-my-zsh-theme
Alien
An asynchronous zsh prompt
Stars: ✭ 218 (+1353.33%)
Mutual labels:  zsh-theme


Spacezsh 🚀

ZSH prompt for Astronauts.

Zsh Version MIT license

Built with ❤︎ by laggardkernel and contributors
A fork of Spaceship ZSH by Denys Dovhan

Spacezsh is an async prompt tries to do things right in the ZSH way. It introduces a lot of ZSH goodies including:

  • Conditional async on each section/segment with tag section::async
  • 100% promptinit compliant.
  • autoload all of the functions.
  • Speed the prompt up with ZSH built-in utilities
    • Env var $EPOCHREALTIME replaces external command date in exec_time section;
    • ZSH module jobstates replaces external command jobs in jobs section;
    • Section vcs based on ZSH utility vcs_info replaces section git and hg. It also adds support for SVN;
    • Complete vi mode with more type of hooks being used for a better detection of mode changes.
    • Trigger prompt redrawing on hook chpwd where hook precmd is not triggered;
  • For more changes, new features, new sections brought by Spacezsh, check the CHANGELOG for detail.

Spacezsh with Hyper and One Dark

Visit Troubleshooting for instructions to recreate this terminal setup.

Features

  • Clever hostname and username displaying.
  • Prompt character turns red if the last command exits with non-zero code.
  • (New) Prompt character changes with vi modes.
  • (New) Current branch and status support for Git, Mercurial, SVN:
    • ? — untracked changes;
    • — unstaged changes;
    • — staged/uncommitted changes in the index;
    • $ — stashed changes;
    • — ahead of remote branch;
    • — behind of remote branch;
    • The following states are supported but disable by default:
      • » — renamed files;
      • — deleted files;
      • = — unmerged changes;
      • changeset/commit id;
  • Indicator for jobs in the background ().
  • Current Node.js version, through nvm/nodenv/n ().
  • Current Ruby version, through rvm/rbenv/chruby/asdf (💎).
  • Current Elm version (🌳)
  • Current Elixir version, through kiex/exenv/elixir (💧).
  • Current Swift version, through swiftenv (🐦).
  • Current Xcode version, through xenv (🛠).
  • Current Go version (🐹).
  • Current PHP version (🐘).
  • Current Rust version (𝗥).
  • Current version of Haskell GHC Compiler, defined in stack.yaml file (λ).
  • Current Julia version ().
  • (New) Currnet Vagrant machine status ()
  • Current Docker version and connected machine (🐳).
  • Current Amazon Web Services (AWS) profile (☁️) (Using named profiles).
  • Current Google Cloud Platform gcloud active configuration (☁️).
  • Current Python virtualenv (🐍).
  • Current .NET SDK version, through dotnet-cli (.NET).
  • Current Ember.js version, through ember-cli (🐹).
  • Current Kubectl context (☸️).
  • Current Terraform workspace (🛠).
  • Package version, if there's is a package in current directory (📦).
  • Current battery level and status:
    • - charging;
    • - discharging;
    • - fully charged.
  • Current Vi-mode mode (with handy aliases for temporarily enabling).
  • Optional exit-code of last command (how to enable).
  • Optional time stamps 12/24hr in format (how to enable).
  • Execution time of the last command if it exceeds the set threshold.

Want more features? Please, open an issue or send pull request.

Requirements

To work correctly, you will first need:

Installing

zinit

Use this command in your .zshrc to load Spacezsh:

# Optional: compile source files into bytecode to speed up init
# zinit ice pick'spacezsh.zsh' \
#   compile'{presets/^(*.zwc),lib/**/^(*.zwc),sections/^(*.zwc)}'
zinit light laggardkernel/spacezsh-prompt

prezto

TODO

oh-my-zsh

Clone this repo:

git clone https://github.com/laggardkernel/spacezsh-prompt.git "$ZSH_CUSTOM/themes/spacezsh-prompt" --depth=1

Symlink spacezsh.zsh-theme to your oh-my-zsh custom themes directory:

ln -s "$ZSH_CUSTOM/themes/spacezsh-prompt/spacezsh.zsh-theme" "$ZSH_CUSTOM/themes/spacezsh.zsh-theme"

Set ZSH_THEME="spacezsh" in your .zshrc.

Customization

Spacezsh works well out of the box, but you can customize almost everything if you want.

  • Options — Tweak section's behavior with tons of options.
  • API — Define a custom section that will do exactly what you want.

You have the ability to customize or disable specific elements of Spaceship. Set options and define new sections in your .zshrc file, after the theme. To include a custom section you have defined in your prompt, add it to the SPACESHIP_PROMPT_ORDER.

For example:

# .zshrc

# add Spaceship (differs by setup, see Installating above)

section_mysection() {
  # ...
}

SPACESHIP_PROMPT_ORDER=(<any preceding sections> mysection <any following sections>)

To append custom sections to the default Spaceship prompt, follow the form:

SPACESHIP_PROMPT_ORDER=($SPACESHIP_PROMPT_ORDER mysection)

To prepend custom sections to the default Spaceship prompt, follow the form:

SPACESHIP_PROMPT_ORDER=(mysection $SPACESHIP_PROMPT_ORDER)

Troubleshooting

Having trouble? Take a look at out Troubleshooting page.

Still struggling? Please, file an issue, describe your problem and we will gladly help you.

Credits

License

MIT © laggardkernel

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].