Commit 223fd60b authored by Bob Williams's avatar Bob Williams
Browse files

Merge remote-tracking branch 'upstream/master'

parents 185cb6e3 ee21fe94
# ------------------------------------------------------------------------ # Needs Git plugin for current_branch method
# Juan G. Hurtado oh-my-zsh theme
# (Needs Git plugin for current_branch method)
# ------------------------------------------------------------------------
# Color shortcuts # Color shortcuts
RED=$fg[red] RED=$fg[red]
...@@ -43,4 +40,4 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]" ...@@ -43,4 +40,4 @@ ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$WHITE%}]"
PROMPT=' PROMPT='
%{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%} %{$GREEN_BOLD%}%n@%m%{$WHITE%}:%{$YELLOW%}%~%u$(parse_git_dirty)$(git_prompt_ahead)%{$RESET_COLOR%}
%{$BLUE%}>%{$RESET_COLOR%} ' %{$BLUE%}>%{$RESET_COLOR%} '
RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}' RPROMPT='%{$GREEN_BOLD%}$(current_branch)$(git_prompt_short_sha)$(git_prompt_status)%{$RESET_COLOR%}'
\ No newline at end of file
# ------------------------------------------------------------------------
# Tyler Cipriani
# oh-my-zsh theme
# Totally ripped off Dallas theme # Totally ripped off Dallas theme
# ------------------------------------------------------------------------
# Grab the current date (%W) and time (%t): # Grab the current date (%W) and time (%t):
JUNKFOOD_TIME_="%{$fg_bold[red]%}#%{$fg_bold[white]%}( %{$fg_bold[yellow]%}%W%{$reset_color%}@%{$fg_bold[white]%}%t )( %{$reset_color%}" JUNKFOOD_TIME_="%{$fg_bold[red]%}#%{$fg_bold[white]%}( %{$fg_bold[yellow]%}%W%{$reset_color%}@%{$fg_bold[white]%}%t )( %{$reset_color%}"
......
# ------------------------------------------------------------------------------ # kphoen.zsh-theme
# FILE: kphoen.zsh-theme
# DESCRIPTION: oh-my-zsh theme file.
# AUTHOR: Kévin Gomez (geek63@gmail.com)
# VERSION: 1.0.0
# SCREENSHOT:
# ------------------------------------------------------------------------------
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)] PROMPT='[%{$fg[red]%}%n%{$reset_color%}@%{$fg[magenta]%}%m%{$reset_color%}:%{$fg[blue]%}%~%{$reset_color%}$(git_prompt_info)]
......
...@@ -18,28 +18,6 @@ ...@@ -18,28 +18,6 @@
# Github: https://github.com/nicoulaj # Github: https://github.com/nicoulaj
# Twitter: https://twitter.com/nicoulaj # Twitter: https://twitter.com/nicoulaj
# #
# License
#
# Copyright (c) 2013 Kasper Kronborg Isager
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Set required options # Set required options
......
# /|/ Code by Stephen
# /|/ "Rixius" Middleton
#
# name in folder (github) # name in folder (github)
# ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right. # ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right.
function collapse_pwd { function collapse_pwd {
......
...@@ -18,8 +18,11 @@ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%}✂" ...@@ -18,8 +18,11 @@ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%}✂"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}✈" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}✈"
function mygit() { function mygit() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return ref1=$(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" ref2=$(git rev-parse HEAD | head -c 6) || return
ref="$ref1 %{$fg[grey]%}$ref2"
#ref=$(git symbolic-ref HEAD 2> /dev/null) $(git rev-parse HEAD | head -c 6) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX "
} }
function retcode() {} function retcode() {}
......
# ----------------------------------------------------------------------------- # smt.zsh-theme, based on dogenpunk by Matthew Nelson.
# FILE: smt.zsh-theme
# DESCRIPTION: oh-my-zsh theme file, based on dogenpunk by Matthew Nelson.
# AUTHOR: Stephen Tudor (stephen@tudorstudio.com
# VERSION: 0.1
# SCREENSHOT: coming soon
# -----------------------------------------------------------------------------
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%} " local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%} "
......
# ------------------------------------------------------------------------------ # sorin.zsh-theme
# FILE: sorin.zsh-theme # screenshot: http://i.imgur.com/aipDQ.png
# DESCRIPTION: oh-my-zsh theme file.
# AUTHOR: Sorin Ionescu (sorin.ionescu@gmail.com)
# VERSION: 1.0.2
# SCREENSHOT: http://i.imgur.com/aipDQ.png
# ------------------------------------------------------------------------------
if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}"
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# http://briancarper.net/blog/570/git-info-in-your-zsh-prompt # http://briancarper.net/blog/570/git-info-in-your-zsh-prompt
function virtualenv_info { function virtualenv_info {
[ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' [ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') '
} }
PR_GIT_UPDATE=1 PR_GIT_UPDATE=1
...@@ -87,7 +87,7 @@ function steeef_precmd { ...@@ -87,7 +87,7 @@ function steeef_precmd {
else else
FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})" FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})"
fi fi
zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH}" zstyle ':vcs_info:*:prompt:*' formats "${FMT_BRANCH} "
vcs_info 'prompt' vcs_info 'prompt'
PR_GIT_UPDATE= PR_GIT_UPDATE=
...@@ -96,5 +96,5 @@ function steeef_precmd { ...@@ -96,5 +96,5 @@ function steeef_precmd {
add-zsh-hook precmd steeef_precmd add-zsh-hook precmd steeef_precmd
PROMPT=$' PROMPT=$'
%{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_ %{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_$(virtualenv_info)%{$reset_color%}
$(virtualenv_info)$ ' $ '
#------------------------------------------------------------------------------- # Sunrise theme for oh-my-zsh
# Sunrise theme for oh-my-zsh by Adam Lindberg (eproxus@gmail.com)
# Intended to be used with Solarized: http://ethanschoonover.com/solarized # Intended to be used with Solarized: http://ethanschoonover.com/solarized
# (Needs Git plugin for current_branch method) # (Needs Git plugin for current_branch method)
#-------------------------------------------------------------------------------
# Color shortcuts # Color shortcuts
R=$fg_no_bold[red] R=$fg_no_bold[red]
......
# Name: trapd00r zsh theme # trapd00r.zsh-theme
# Author: Magnus Woldrich <m@japh.se>
# #
# This theme needs a terminal supporting 256 colors as well as unicode. It also # This theme needs a terminal supporting 256 colors as well as unicode. It also
# needs the script that splits up the current path and makes it fancy as located # needs the script that splits up the current path and makes it fancy as located
......
...@@ -32,3 +32,16 @@ PROMPT=" ...@@ -32,3 +32,16 @@ PROMPT="
${git_info} \ ${git_info} \
%{$fg[white]%}[%*] %{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
if [[ "$(whoami)" == "root" ]]; then
PROMPT="
%{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \
%{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \
%{$fg[white]%}at \
%{$fg[green]%}$(box_name) \
%{$fg[white]%}in \
%{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\
${git_info} \
%{$fg[white]%}[%*]
%{$terminfo[bold]$fg[red]%}$ %{$reset_color%}"
fi
ZSH=`/usr/bin/env|grep 'ZSH='|cut -d '=' -f 2` set -e
if [ -d "$ZSH" ]
then if [ ! -n "$ZSH" ]; then
ZSH=~/.oh-my-zsh
fi
if [ -d "$ZSH" ]; then
echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove $ZSH if you want to install" echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove $ZSH if you want to install"
exit exit
elif [ -d ~/.oh-my-zsh ]
then
echo "\033[0;33mYou already have One Oh My Zsh Directory.\033[0m You'll need to remove ~/.oh-my-zsh if you want to clone"
exit
fi fi
echo "\033[0;34mCloning Oh My Zsh...\033[0m" echo "\033[0;34mCloning Oh My Zsh...\033[0m"
hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || { hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || {
echo "git not installed" echo "git not installed"
exit exit
} }
echo "\033[0;34mLooking for an existing zsh config...\033[0m" echo "\033[0;34mLooking for an existing zsh config...\033[0m"
if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then
then
echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m"; echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m";
mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh;
fi fi
echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m"
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc cp $ZSH/templates/zshrc.zsh-template ~/.zshrc
sed -i -e "/^ZSH=/ c\\
ZSH=$ZSH
" ~/.zshrc
echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m"
sed -i -e "/export PATH=/ c\\ sed -i -e "/export PATH=/ c\\
...@@ -38,9 +40,8 @@ echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m ...@@ -38,9 +40,8 @@ echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m
echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m"
echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m"
echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m" echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m"
echo "\033[0;32m"' /____/ '"\033[0m" echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m"
echo "\n\n \033[0;32m....is now installed.\033[0m"
echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m"
echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m"
/usr/bin/env zsh /usr/bin/env zsh
source ~/.zshrc . ~/.zshrc
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment