mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh
This commit is contained in:
commit
093a18a07a
31 changed files with 1095 additions and 79 deletions
26
themes/apple.zsh-theme
Normal file
26
themes/apple.zsh-theme
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
function toon {
|
||||
echo -n ""
|
||||
}
|
||||
|
||||
get_git_dirty() {
|
||||
git diff --quiet || echo '*'
|
||||
}
|
||||
|
||||
autoload -Uz vcs_info
|
||||
autoload -U colors && colors
|
||||
zstyle ':vcs_info:*' check-for-changes true
|
||||
zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes
|
||||
zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes
|
||||
zstyle ':vcs_info:*' actionformats \
|
||||
'%F{5}%F{5}[%F{2}%b%F{3}|%F{1}%a%c%u%F{5}]%f '
|
||||
zstyle ':vcs_info:*' formats \
|
||||
'%F{5}%F{5}[%F{2}%b%c%u%F{5}]%f '
|
||||
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
|
||||
zstyle ':vcs_info:*' enable git cvs svn
|
||||
|
||||
precmd () {
|
||||
vcs_info
|
||||
}
|
||||
|
||||
setopt prompt_subst
|
||||
PROMPT='%{$fg[magenta]%}$(toon)%{$reset_color%} %~/ %{$reset_color%}${vcs_info_msg_0_}%{$reset_color%}'
|
||||
37
themes/crunch.zsh-theme
Normal file
37
themes/crunch.zsh-theme
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
# CRUNCH - created from Steve Eley's cat waxing.
|
||||
# Initially hacked from the Dallas theme. Thanks, Dallas Reedy.
|
||||
#
|
||||
# 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
|
||||
# things that vary in my own workflow are shown:
|
||||
#
|
||||
# * The time (not the date)
|
||||
# * The RVM version and gemset (omitting the 'ruby' name if it's MRI)
|
||||
# * The current directory
|
||||
# * The Git branch and its 'dirty' state
|
||||
#
|
||||
# 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%}"
|
||||
CRUNCH_RVM_="$CRUNCH_BRACKET_COLOR"["$CRUNCH_RVM_COLOR\${\$(~/.rvm/bin/rvm-prompt i v g)#ruby-}$CRUNCH_BRACKET_COLOR"]"%{$reset_color%}"
|
||||
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%}"
|
||||
39
themes/fino.zsh-theme
Normal file
39
themes/fino.zsh-theme
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
# Fino theme by Max Masnick (http://max.masnick.me)
|
||||
|
||||
# Use with a dark background and 256-color terminal!
|
||||
# Meant for people with RVM and git. Tested only on OS X 10.7.
|
||||
|
||||
# You can set your computer name in the ~/.box-name file if you want.
|
||||
|
||||
# Borrowing shamelessly from these oh-my-zsh themes:
|
||||
# bira
|
||||
# robbyrussell
|
||||
#
|
||||
# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/
|
||||
|
||||
function virtualenv_info {
|
||||
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
|
||||
}
|
||||
|
||||
function prompt_char {
|
||||
git branch >/dev/null 2>/dev/null && echo '±' && return
|
||||
echo '○'
|
||||
}
|
||||
|
||||
function box_name {
|
||||
[ -f ~/.box-name ] && cat ~/.box-name || hostname -s
|
||||
}
|
||||
|
||||
|
||||
local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}'
|
||||
local current_dir='${PWD/#$HOME/~}'
|
||||
local git_info='$(git_prompt_info)'
|
||||
|
||||
|
||||
PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%} ${rvm_ruby}
|
||||
╰─$(virtualenv_info)$(prompt_char) "
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔"
|
||||
8
themes/fox.zsh-theme
Normal file
8
themes/fox.zsh-theme
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#fox theme
|
||||
PROMPT='%{$fg[cyan]%}┌[%{$fg_bold[white]%}%n%{$reset_color%}%{$fg[cyan]%}☮%{$fg_bold[white]%}%M%{$reset_color%}%{$fg[cyan]%}]%{$fg[white]%}-%{$fg[cyan]%}(%{$fg_bold[white]%}%~%{$reset_color%}%{$fg[cyan]%})$(git_prompt_info)
|
||||
└> % %{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="-[%{$reset_color%}%{$fg[white]%}git://%{$fg_bold[white]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}%{$fg[cyan]%}]-"
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}✗%{$reset_color%}"
|
||||
ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}✔%{$reset_color%}"
|
||||
54
themes/gnzh.zsh-theme
Normal file
54
themes/gnzh.zsh-theme
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png
|
||||
# Based on bira theme
|
||||
|
||||
# load some modules
|
||||
autoload -U colors zsh/terminfo # Used in the colour alias below
|
||||
colors
|
||||
setopt prompt_subst
|
||||
|
||||
# make some aliases for the colours: (coud use normal escap.seq's too)
|
||||
for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do
|
||||
eval PR_$color='%{$fg[${(L)color}]%}'
|
||||
done
|
||||
eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
|
||||
eval PR_BOLD="%{$terminfo[bold]%}"
|
||||
|
||||
# Check the UID
|
||||
if [[ $UID -ge 1000 ]]; then # normal user
|
||||
eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
|
||||
eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
|
||||
local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
|
||||
elif [[ $UID -eq 0 ]]; then # root
|
||||
eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
|
||||
eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
|
||||
local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
|
||||
fi
|
||||
|
||||
# Check if we are on SSH or not
|
||||
if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then
|
||||
eval PR_HOST='${PR_YELLOW}%M${PR_NO_COLOR}' #SSH
|
||||
else
|
||||
eval PR_HOST='${PR_GREEN}%M${PR_NO_COLOR}' # no SSH
|
||||
fi
|
||||
|
||||
local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})"
|
||||
|
||||
local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}'
|
||||
local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}'
|
||||
local rvm_ruby=''
|
||||
if which rvm-prompt &> /dev/null; then
|
||||
rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}'
|
||||
else
|
||||
if which rbenv &> /dev/null; then
|
||||
rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}'
|
||||
fi
|
||||
fi
|
||||
local git_branch='$(git_prompt_info)%{$PR_NO_COLOR%}'
|
||||
|
||||
#PROMPT="${user_host} ${current_dir} ${rvm_ruby} ${git_branch}$PR_PROMPT "
|
||||
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch}
|
||||
╰─$PR_PROMPT "
|
||||
RPS1="${return_code}"
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$PR_NO_COLOR%}"
|
||||
4
themes/norm.zsh-theme
Normal file
4
themes/norm.zsh-theme
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
PROMPT='%{$fg[yellow]%}λ %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)%{$reset_color%}'
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_PREFIX="λ %{$fg[blue]%}git %{$fg[red]%}"
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"
|
||||
29
themes/rkj-repos.zsh-theme
Normal file
29
themes/rkj-repos.zsh-theme
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# user, host, full path, and time/date
|
||||
# on two lines for easier vgrepping
|
||||
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||
|
||||
function hg_prompt_info {
|
||||
hg prompt --angle-brackets "\
|
||||
<hg:%{$fg[magenta]%}<branch>%{$reset_color%}>\
|
||||
</%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
|
||||
%{$fg[red]%}<status|modified|unknown><update>%{$reset_color%}<
|
||||
patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
|
||||
}
|
||||
|
||||
ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%}+"
|
||||
ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%}✱"
|
||||
ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✗"
|
||||
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}➦"
|
||||
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%}✂"
|
||||
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}✈"
|
||||
|
||||
function mygit() {
|
||||
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
|
||||
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
||||
}
|
||||
|
||||
# alternate prompt with git & hg
|
||||
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B] <$(mygit)$(hg_prompt_info)>%{\e[0m%}%b '
|
||||
PS2=$' \e[0;34m%}%B>%{\e[0m%}%b '
|
||||
|
||||
8
themes/rkj.zsh-theme
Normal file
8
themes/rkj.zsh-theme
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# user, host, full path, and time/date
|
||||
# on two lines for easier vgrepping
|
||||
# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888
|
||||
|
||||
PROMPT=$'%{\e[0;34m%}%B┌─[%b%{\e[0m%}%{\e[1;32m%}%n%{\e[1;30m%}@%{\e[0m%}%{\e[0;36m%}%m%{\e[0;34m%}%B]%b%{\e[0m%} - %b%{\e[0;34m%}%B[%b%{\e[1;37m%}%~%{\e[0;34m%}%B]%b%{\e[0m%} - %{\e[0;34m%}%B[%b%{\e[0;33m%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{\e[0;34m%}%B]%b%{\e[0m%}
|
||||
%{\e[0;34m%}%B└─%B[%{\e[1;35m%}$%{\e[0;34m%}%B]%{\e[0m%}%b '
|
||||
|
||||
|
||||
5
themes/wuffers.zsh-theme
Normal file
5
themes/wuffers.zsh-theme
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}["
|
||||
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%} "
|
||||
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg_bold[red]%} x%{$fg_bold[blue]%}"
|
||||
|
||||
PROMPT='%{$(git_prompt_info)%}%{$fg_bold[green]%}{%{$(rvm current)%}}%{$reset_color%} %{$fg[cyan]%}%c%{$reset_color%} '
|
||||
Loading…
Add table
Add a link
Reference in a new issue