2011-02-22 20:03:48 +01:00
|
|
|
# CRUNCH - created from Steve Eley's cat waxing.
|
|
|
|
# Initially hacked from the Dallas theme. Thanks, Dallas Reedy.
|
|
|
|
#
|
2024-03-26 09:55:16 +01:00
|
|
|
# This theme assumes you do most of your oh-my-zsh'ed "colorful" work at a single machine,
|
|
|
|
# and eschews the standard space-consuming user and hostname info. Instead, only the
|
2011-02-22 20:03:48 +01:00
|
|
|
# things that vary in my own workflow are shown:
|
|
|
|
#
|
|
|
|
# * The time (not the date)
|
2011-02-22 20:38:37 +01:00
|
|
|
# * The RVM version and gemset (omitting the 'ruby' name if it's MRI)
|
2011-02-22 20:03:48 +01:00
|
|
|
# * The current directory
|
|
|
|
# * The Git branch and its 'dirty' state
|
2024-03-26 09:55:16 +01:00
|
|
|
#
|
2011-02-22 20:03:48 +01:00
|
|
|
# Colors are at the top so you can mess with those separately if you like.
|
|
|
|
# For the most part I stuck with Dallas's.
|
|
|
|
|
|
|
|
CRUNCH_BRACKET_COLOR="%{$fg[white]%}"
|
|
|
|
CRUNCH_TIME_COLOR="%{$fg[yellow]%}"
|
|
|
|
CRUNCH_RVM_COLOR="%{$fg[magenta]%}"
|
|
|
|
CRUNCH_DIR_COLOR="%{$fg[cyan]%}"
|
|
|
|
CRUNCH_GIT_BRANCH_COLOR="%{$fg[green]%}"
|
|
|
|
CRUNCH_GIT_CLEAN_COLOR="%{$fg[green]%}"
|
|
|
|
CRUNCH_GIT_DIRTY_COLOR="%{$fg[red]%}"
|
|
|
|
|
|
|
|
# These Git variables are used by the oh-my-zsh git_prompt_info helper:
|
|
|
|
ZSH_THEME_GIT_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR:$CRUNCH_GIT_BRANCH_COLOR"
|
|
|
|
ZSH_THEME_GIT_PROMPT_SUFFIX=""
|
|
|
|
ZSH_THEME_GIT_PROMPT_CLEAN=" $CRUNCH_GIT_CLEAN_COLOR✓"
|
|
|
|
ZSH_THEME_GIT_PROMPT_DIRTY=" $CRUNCH_GIT_DIRTY_COLOR✗"
|
|
|
|
|
|
|
|
# Our elements:
|
|
|
|
CRUNCH_TIME_="$CRUNCH_BRACKET_COLOR{$CRUNCH_TIME_COLOR%T$CRUNCH_BRACKET_COLOR}%{$reset_color%}"
|
2015-11-06 23:20:11 +01:00
|
|
|
ZSH_THEME_RUBY_PROMPT_PREFIX="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR"
|
|
|
|
ZSH_THEME_RUBY_PROMPT_SUFFIX="$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
|
|
|
|
CRUNCH_RVM_='$(ruby_prompt_info)'
|
2011-02-22 20:03:48 +01:00
|
|
|
CRUNCH_DIR_="$CRUNCH_DIR_COLOR%~\$(git_prompt_info) "
|
|
|
|
CRUNCH_PROMPT="$CRUNCH_BRACKET_COLOR➭ "
|
|
|
|
|
|
|
|
# Put it all together!
|
|
|
|
PROMPT="$CRUNCH_TIME_$CRUNCH_RVM_$CRUNCH_DIR_$CRUNCH_PROMPT%{$reset_color%}"
|