Commit 6952105b authored by Pavol Juhas's avatar Pavol Juhas
Browse files
parents ed19ffee ca900216
function _rails_command () { function _rails_command () {
if [ -e "script/server" ]; then if [ -e "bin/rails" ]; then
ruby script/$@ bin/rails $@
elif [ -e "script/rails" ]; then elif [ -e "script/rails" ]; then
ruby script/rails $@ ruby script/rails $@
elif [ -e "bin/rails" ]; then elif [ -e "script/server" ]; then
bin/rails $@ ruby script/$@
else else
rails $@ rails $@
fi fi
...@@ -51,6 +51,7 @@ alias rds='rake db:seed' ...@@ -51,6 +51,7 @@ alias rds='rake db:seed'
alias rdd='rake db:drop' alias rdd='rake db:drop'
alias rdtc='rake db:test:clone' alias rdtc='rake db:test:clone'
alias rdtp='rake db:test:prepare' alias rdtp='rake db:test:prepare'
alias rdmtc='rake db:migrate db:test:clone'
alias rlc='rake log:clear' alias rlc='rake log:clear'
alias rn='rake notes' alias rn='rake notes'
......
# Thank you Jim for everything you contributed to the Ruby and open source community
# over the years. We will miss you dearly.
alias jimweirich="rake"
alias rake="noglob rake" # allows square brackts for rake task invocation alias rake="noglob rake" # allows square brackts for rake task invocation
alias brake='noglob bundle exec rake' # execute the bundled rake gem alias brake='noglob bundle exec rake' # execute the bundled rake gem
alias srake='noglob sudo rake' # noglob must come before sudo alias srake='noglob sudo rake' # noglob must come before sudo
......
...@@ -10,12 +10,18 @@ FOUND_RBENV=0 ...@@ -10,12 +10,18 @@ FOUND_RBENV=0
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv") rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv")
if _homebrew-installed && _rbenv-from-homebrew-installed ; then if _homebrew-installed && _rbenv-from-homebrew-installed ; then
rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}") rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
if [[ $RBENV_ROOT = '' ]]; then
RBENV_ROOT="$HOME/.rbenv"
fi
fi fi
for rbenvdir in "${rbenvdirs[@]}" ; do for rbenvdir in "${rbenvdirs[@]}" ; do
if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then
FOUND_RBENV=1 FOUND_RBENV=1
export RBENV_ROOT=$rbenvdir if [[ $RBENV_ROOT = '' ]]; then
RBENV_ROOT=$rbenvdir
fi
export RBENV_ROOT
export PATH=${rbenvdir}/bin:$PATH export PATH=${rbenvdir}/bin:$PATH
eval "$(rbenv init --no-rehash - zsh)" eval "$(rbenv init --no-rehash - zsh)"
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
# Florent Thoumie and Jonas Pfenniger # Florent Thoumie and Jonas Pfenniger
# #
local _plugin__ssh_env=$HOME/.ssh/environment-$HOST local _plugin__ssh_env
local _plugin__forwarding local _plugin__forwarding
function _plugin__start_agent() function _plugin__start_agent()
...@@ -42,12 +42,20 @@ function _plugin__start_agent() ...@@ -42,12 +42,20 @@ function _plugin__start_agent()
. ${_plugin__ssh_env} > /dev/null . ${_plugin__ssh_env} > /dev/null
# load identies # load identies
zstyle -a :omz:plugins:ssh-agent identities identities zstyle -a :omz:plugins:ssh-agent identities identities
echo starting ssh-agent... echo starting ssh-agent...
/usr/bin/ssh-add $HOME/.ssh/${^identities} /usr/bin/ssh-add $HOME/.ssh/${^identities}
} }
# Get the filename to store/lookup the environment from
if (( $+commands[scutil] )); then
# It's OS X!
_plugin__ssh_env="$HOME/.ssh/environment-$(scutil --get ComputerName)"
else
_plugin__ssh_env="$HOME/.ssh/environment-$HOST"
fi
# test if agent-forwarding is enabled # test if agent-forwarding is enabled
zstyle -b :omz:plugins:ssh-agent agent-forwarding _plugin__forwarding zstyle -b :omz:plugins:ssh-agent agent-forwarding _plugin__forwarding
if [[ ${_plugin__forwarding} == "yes" && -n "$SSH_AUTH_SOCK" ]]; then if [[ ${_plugin__forwarding} == "yes" && -n "$SSH_AUTH_SOCK" ]]; then
......
# Sublime Text 2 Aliases # Sublime Text 2 Aliases
local _sublime_darwin_paths > /dev/null 2>&1
_sublime_darwin_paths=(
"/usr/local/bin/subl"
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
"/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
)
if [[ $('uname') == 'Linux' ]]; then if [[ $('uname') == 'Linux' ]]; then
if [ -f '/usr/bin/sublime_text' ]; then local _sublime_linux_paths > /dev/null 2>&1
st_run() { nohup /usr/bin/sublime_text $@ > /dev/null & } _sublime_linux_paths=(
else "$HOME/bin/sublime_text"
st_run() { nohup /usr/bin/sublime-text $@ > /dev/null & } "/opt/sublime_text/sublime_text"
fi "/usr/bin/sublime_text"
alias st=st_run "/usr/local/bin/sublime_text"
)
for _sublime_path in $_sublime_linux_paths; do
if [[ -a $_sublime_path ]]; then
st_run() { $_sublime_path $@ >/dev/null 2>&1 &| }
alias st=st_run
break
fi
done
elif [[ $('uname') == 'Darwin' ]]; then elif [[ $('uname') == 'Darwin' ]]; then
local _sublime_darwin_paths > /dev/null 2>&1
_sublime_darwin_paths=(
"/usr/local/bin/subl"
"/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
"/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
)
for _sublime_path in $_sublime_darwin_paths; do for _sublime_path in $_sublime_darwin_paths; do
if [[ -a $_sublime_path ]]; then if [[ -a $_sublime_path ]]; then
......
# vim:ft=zsh ts=2 sw=2 sts=2 et
#
# Faster alternative to the current SVN plugin implementation.
#
# Works with svn 1.6, 1.7, 1.8.
# Use `svn_prompt_info` method to enquire the svn data.
# It's faster because his efficient use of svn (single svn call) which saves a lot on a huge codebase
# It displays the current status of the local files (added, deleted, modified, replaced, or else...)
#
# Use as a drop-in replacement of the svn plugin not as complementary plugin
function svn_prompt_info() {
local info
info=$(svn info 2>&1) || return 1; # capture stdout and stderr
local repo_need_upgrade=$(svn_repo_need_upgrade $info)
if [[ -n $repo_need_upgrade ]]; then
printf '%s%s%s%s%s%s%s\n' \
$ZSH_PROMPT_BASE_COLOR \
$ZSH_THEME_SVN_PROMPT_PREFIX \
$ZSH_PROMPT_BASE_COLOR \
$repo_need_upgrade \
$ZSH_PROMPT_BASE_COLOR \
$ZSH_THEME_SVN_PROMPT_SUFFIX \
$ZSH_PROMPT_BASE_COLOR
else
printf '%s%s%s %s%s:%s%s%s%s%s' \
$ZSH_PROMPT_BASE_COLOR \
$ZSH_THEME_SVN_PROMPT_PREFIX \
\
"$(svn_status_info $info)" \
$ZSH_PROMPT_BASE_COLOR \
\
$ZSH_THEME_BRANCH_NAME_COLOR \
$(svn_current_branch_name $info) \
$ZSH_PROMPT_BASE_COLOR \
\
$(svn_current_revision $info) \
$ZSH_PROMPT_BASE_COLOR \
\
$ZSH_THEME_SVN_PROMPT_SUFFIX \
$ZSH_PROMPT_BASE_COLOR
fi
}
function svn_repo_need_upgrade() {
grep -q "E155036" <<< ${1:-$(svn info 2> /dev/null)} && \
echo "E155036: upgrade repo with svn upgrade"
}
function svn_current_branch_name() {
grep '^URL:' <<< "${1:-$(svn info 2> /dev/null)}" | egrep -o '(tags|branches)/[^/]+|trunk'
}
function svn_repo_root_name() {
grep '^Repository\ Root:' <<< "${1:-$(svn info 2> /dev/null)}" | sed 's#.*/##'
}
function svn_current_revision() {
echo "${1:-$(svn info 2> /dev/null)}" | sed -n 's/Revision: //p'
}
function svn_status_info() {
local svn_status_string="$ZSH_THEME_SVN_PROMPT_CLEAN"
local svn_status="$(svn status 2> /dev/null)";
if grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi
if grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-}"; fi
if grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-}"; fi
if grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-}"; fi
if grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi
if grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi
echo $svn_status_string
}
...@@ -9,7 +9,7 @@ function svn_prompt_info() { ...@@ -9,7 +9,7 @@ function svn_prompt_info() {
_DISPLAY=$(svn_get_repo_name) _DISPLAY=$(svn_get_repo_name)
fi fi
echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_PREFIX\ echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_PREFIX\
$ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(svn_dirty)$ZSH_PROMPT_BASE_COLOR" $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(svn_dirty)$(svn_dirty_pwd)$ZSH_PROMPT_BASE_COLOR"
unset _DISPLAY unset _DISPLAY
fi fi
} }
...@@ -74,3 +74,22 @@ function svn_dirty_choose() { ...@@ -74,3 +74,22 @@ function svn_dirty_choose() {
function svn_dirty() { function svn_dirty() {
svn_dirty_choose $ZSH_THEME_SVN_PROMPT_DIRTY $ZSH_THEME_SVN_PROMPT_CLEAN svn_dirty_choose $ZSH_THEME_SVN_PROMPT_DIRTY $ZSH_THEME_SVN_PROMPT_CLEAN
} }
function svn_dirty_choose_pwd () {
if in_svn; then
root=`pwd`
if $(svn status $root 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'); then
# Grep exits with 0 when "One or more lines were selected", return "dirty".
echo $1
else
# Otherwise, no lines were found, or an error occurred. Return clean.
echo $2
fi
fi
}
function svn_dirty_pwd () {
svn_dirty_choose_pwd $ZSH_THEME_SVN_PROMPT_DIRTY_PWD $ZSH_THEME_SVN_PROMPT_CLEAN_PWD
}
#compdef wd.sh #compdef wd
zstyle ":completion:*:descriptions" format "%B%d%b" zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion::complete:wd:*:commands' group-name commands
CONFIG=$HOME/.warprc zstyle ':completion::complete:wd:*:warp_points' group-name warp_points
zstyle ':completion::complete:wd::' list-grouped
local -a main_commands
main_commands=( # Call `_wd()` when when trying to complete the command `wd`
add:'Adds the current working directory to your warp points'
#add'\!':'Overwrites existing warp point' # TODO: Fix zmodload zsh/mapfile
rm:'Removes the given warp point' function _wd() {
ls:'Outputs all stored warp points' local ret=1
show:'Outputs warp points to current directory' local CONFIG=$HOME/.warprc
)
# Stolen from
local -a points # http://stackoverflow.com/questions/9000698/completion-when-program-has-sub-commands
while read line
do # local curcontext="$curcontext" state line
points+=$(awk "{ gsub(/\/Users\/$USER|\/home\/$USER/,\"~\"); print }" <<< $line) # typeset -A opt_args
done < $CONFIG
local -a commands
_wd() local -a warp_points
{ warp_points=( "${(f)mapfile[$CONFIG]}" )
# init variables # LIST="${mapfile[$FNAME]}" # Not required unless stuff uses it
local curcontext="$curcontext" state line
typeset -A opt_args commands=(
'add:Adds the current working directory to your warp points'
# init state 'add!:Overwrites existing warp point'
_arguments \ 'rm:Removes the given warp point'
'1: :->command' \ 'ls:Outputs all stored warp points'
'2: :->argument' 'show:Outputs all warp points that point to the current directory'
'help:Show this extremely helpful text'
case $state in '..:Go back to last directory'
command) )
compadd "$@" add rm ls show
_describe -t warp-points 'Warp points:' points && ret=0 _arguments -C \
;; '1: :->first_arg' \
argument) '2: :->second_arg' && ret=0
case $words[2] in
rm|add!) case $state in
_describe -t warp-points 'warp points' points && ret=0 first_arg)
;; _describe -t warp_points "Warp points" warp_points && ret=0
*) _describe -t commands "Commands" commands && ret=0
esac ;;
esac second_arg)
case $words[2] in
add\!|rm)
_describe -t points "Warp points" warp_points && ret=0
;;
add)
_message 'Write the name of your warp point' && ret=0
;;
esac
;;
esac
return $ret
} }
_wd "$@" _wd "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et
...@@ -6,4 +6,6 @@ ...@@ -6,4 +6,6 @@
# #
# @github.com/mfaerevaag/wd # @github.com/mfaerevaag/wd
alias wd='. $ZSH/plugins/wd/wd.sh' wd() {
. $ZSH/plugins/wd/wd.sh
}
...@@ -50,12 +50,12 @@ wd_warp() ...@@ -50,12 +50,12 @@ wd_warp()
wd_print_msg $YELLOW "Warping to current directory?" wd_print_msg $YELLOW "Warping to current directory?"
else else
(( n = $#1 - 1 )) (( n = $#1 - 1 ))
wd_print_msg $BLUE "Warping..." #wd_print_msg $BLUE "Warping..."
cd -$n > /dev/null cd -$n > /dev/null
fi fi
elif [[ ${points[$1]} != "" ]] elif [[ ${points[$1]} != "" ]]
then then
wd_print_msg $BLUE "Warping..." #wd_print_msg $BLUE "Warping..."
cd ${points[$1]} cd ${points[$1]}
else else
wd_print_msg $RED "Unkown warp point '$1'" wd_print_msg $RED "Unkown warp point '$1'"
...@@ -64,16 +64,16 @@ wd_warp() ...@@ -64,16 +64,16 @@ wd_warp()
wd_add() wd_add()
{ {
if [[ $1 =~ "^\.+$" ]] if [[ $2 =~ "^\.+$" || $2 =~ "^\s*$" ]]
then then
wd_print_msg $RED "Illeagal warp point (see README)." wd_print_msg $RED "Illegal warp point (see README)."
elif [[ ${points[$1]} == "" ]] || $2 elif [[ ${points[$2]} == "" ]] || $1
then then
wd_remove $1 > /dev/null wd_remove $2 > /dev/null
print "$1:$PWD" >> $CONFIG print "$2:$PWD" >> $CONFIG
wd_print_msg $GREEN "Warp point added" wd_print_msg $GREEN "Warp point added"
else else
wd_print_msg $YELLOW "Warp point '$1' alredy exists. Use 'add!' to overwrite." wd_print_msg $YELLOW "Warp point '$2' already exists. Use 'add!' to overwrite."
fi fi
} }
...@@ -83,7 +83,9 @@ wd_remove() ...@@ -83,7 +83,9 @@ wd_remove()
then then
if wd_tmp=`sed "/^$1:/d" $CONFIG` if wd_tmp=`sed "/^$1:/d" $CONFIG`
then then
echo $wd_tmp > $CONFIG # `>!` forces overwrite
# we need this if people use `setopt NO_CLOBBER`
echo $wd_tmp >! $CONFIG
wd_print_msg $GREEN "Warp point removed" wd_print_msg $GREEN "Warp point removed"
else else
wd_print_msg $RED "Warp point unsuccessfully removed. Sorry!" wd_print_msg $RED "Warp point unsuccessfully removed. Sorry!"
...@@ -131,9 +133,9 @@ wd_print_usage() ...@@ -131,9 +133,9 @@ wd_print_usage()
print "\nCommands:" print "\nCommands:"
print "\t add \t Adds the current working directory to your warp points" print "\t add \t Adds the current working directory to your warp points"
print "\t add! \t Overwrites existing warp point" print "\t add! \t Overwrites existing warp point"
print "\t remove Removes the given warp point" print "\t rm \t Removes the given warp point"
print "\t show \t Outputs warp points to current directory" print "\t show \t Outputs warp points to current directory"
print "\t list \t Outputs all stored warp points" print "\t ls \t Outputs all stored warp points"
print "\t help \t Show this extremely helpful text" print "\t help \t Show this extremely helpful text"
} }
...@@ -141,7 +143,7 @@ wd_print_usage() ...@@ -141,7 +143,7 @@ wd_print_usage()
## run ## run
# get opts # get opts
args=`getopt -o a:r:lhs -l add:,remove:,list,help,show -- $*` args=`getopt -o a:r:lhs -l add:,rm:,ls,help,show -- $*`
# check if no arguments were given # check if no arguments were given
if [[ $? -ne 0 || $#* -eq 0 ]] if [[ $? -ne 0 || $#* -eq 0 ]]
...@@ -161,49 +163,40 @@ else ...@@ -161,49 +163,40 @@ else
for i for i
do do
case "$i" case "$i"
in in
-a|--add|add) -a|--add|add)
wd_add $2 false wd_add false $2
shift
shift
break break
;; ;;
-a!|--add!|add!) -a!|--add!|add!)
wd_add $2 true wd_add true $2
shift
shift
break break
;; ;;
-r|--remove|rm) -r|--remove|rm)
wd_remove $2 wd_remove $2
shift
shift
break break
;; ;;
-l|--list|ls) -l|--list|ls)
wd_list_all wd_list_all
shift
break break
;; ;;
-h|--help|help) -h|--help|help)
wd_print_usage wd_print_usage
shift
break break
;; ;;
-s|--show|show) -s|--show|show)
wd_show wd_show
shift
break break
;; ;;
*) *)
wd_warp $i wd_warp $i
shift
break break
;; ;;
--) --)
shift; break;; break
esac ;;
esac
done done
fi fi
...@@ -211,6 +204,6 @@ fi ...@@ -211,6 +204,6 @@ fi
## garbage collection ## garbage collection
# if not, next time warp will pick up variables from this run # if not, next time warp will pick up variables from this run
# remember, there's no sub shell # remember, there's no sub shell
points="" unset points
args="" unset args
unhash -d val &> /dev/null # fixes issue #1 unset val &> /dev/null # fixes issue #1
...@@ -16,3 +16,4 @@ function xcsel { ...@@ -16,3 +16,4 @@ function xcsel {
alias xcb='xcodebuild' alias xcb='xcodebuild'
alias xcp='xcode-select --print-path' alias xcp='xcode-select --print-path'
alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
# Yii basic command completion
_yii_get_command_list () {
protected/yiic | awk '/^ - [a-z]+/ { print $2 }'
}
_yii () {
if [ -f protected/yiic ]; then
compadd `_yii_get_command_list`
fi
}
compdef _yii protected/yiic
compdef _yii yiic
# Aliases
alias yiic='protected/yiic'
...@@ -11,13 +11,13 @@ ZSH_THEME="robbyrussell" ...@@ -11,13 +11,13 @@ ZSH_THEME="robbyrussell"
# alias zshconfig="mate ~/.zshrc" # alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh" # alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion # Set this to use case-sensitive completion
# CASE_SENSITIVE="true" # CASE_SENSITIVE="true"
# Uncomment this to disable bi-weekly auto-update checks # Uncomment this to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true" # DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often before auto-updates occur? (in days) # Uncomment to change how often to auto-update? (in days)
# export UPDATE_ZSH_DAYS=13 # export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls # Uncomment following line if you want to disable colors in ls
...@@ -37,9 +37,9 @@ ZSH_THEME="robbyrussell" ...@@ -37,9 +37,9 @@ ZSH_THEME="robbyrussell"
# much faster. # much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true" # DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment following line if you want to shown in the command execution time stamp # Uncomment following line if you want to the command execution time stamp shown
# in the history command output. The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"| # in the history command output.
# yyyy-mm-dd # The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|"yyyy-mm-dd"
# HIST_STAMPS="mm/dd/yyyy" # HIST_STAMPS="mm/dd/yyyy"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
...@@ -66,4 +66,3 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH ...@@ -66,4 +66,3 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH
# ssh # ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id" # export SSH_KEY_PATH="~/.ssh/dsa_id"
...@@ -2,12 +2,12 @@ ...@@ -2,12 +2,12 @@
# # # #
# # #README # # #README
# # # #
# # This theme provides two customizable header functionalities : # # This theme provides two customizable header functionalities:
# # a) displaying a pseudo-random message from a database of quotations # # a) displaying a pseudo-random message from a database of quotations
# # (https://en.wikipedia.org/wiki/Fortune_%28Unix%29) # # (https://en.wikipedia.org/wiki/Fortune_%28Unix%29)
# # b) displaying randomly command line tips from The command line fu # # b) displaying randomly command line tips from The command line fu
# # (http://www.commandlinefu.com) community: in order to make use of this functionality # # (http://www.commandlinefu.com) community: in order to make use of this functionality
# # you will need Internet connection. # # you will need Internet connection.
# # This theme provides as well information for the current user's context, like; # # This theme provides as well information for the current user's context, like;
# # branch and status for the current version control system (git and svn currently # # branch and status for the current version control system (git and svn currently
# # supported) and time, presented to the user in a non invasive volatile way. # # supported) and time, presented to the user in a non invasive volatile way.
...@@ -25,11 +25,8 @@ ...@@ -25,11 +25,8 @@
# # -Solarized theme (https://github.com/altercation/solarized/) # # -Solarized theme (https://github.com/altercation/solarized/)
# # -OS X: iTerm 2 (http://www.iterm2.com/) # # -OS X: iTerm 2 (http://www.iterm2.com/)
# # -font Source code pro (https://github.com/adobe/source-code-pro) # # -font Source code pro (https://github.com/adobe/source-code-pro)
# # # #
# # Author: Adolfo Benedetti # # This theme's look and feel is based on the Aaron Toponce's zsh theme, more info:
# # email: adolfo.benedetti@gmail.com
# # License: Public Domain
# # This theme's look and feel is based on the Aaron Toponce's zsh theme , more info:
# # http://pthree.org/2008/11/23/727/ # # http://pthree.org/2008/11/23/727/
# # enjoy! # # enjoy!
########## COLOR ########### ########## COLOR ###########
......
# af-magic.zsh-theme # af-magic.zsh-theme
#
# Author: Andy Fleming
# URL: http://andyfleming.com/
# Repo: https://github.com/andyfleming/oh-my-zsh # Repo: https://github.com/andyfleming/oh-my-zsh
# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme # Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme
#
# Created on: June 19, 2012
# Last modified on: June 20, 2012
if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
...@@ -27,7 +19,12 @@ eval my_gray='$FG[237]' ...@@ -27,7 +19,12 @@ eval my_gray='$FG[237]'
eval my_orange='$FG[214]' eval my_orange='$FG[214]'
# right prompt # right prompt
RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%' if type "virtualenv_prompt_info" > /dev/null
then
RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%'
else
RPROMPT='$my_gray%n@%m%{$reset_color%}%'
fi
# git settings # git settings
ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:" ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:"
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
# # README # # README
# #
# In order for this theme to render correctly, you will need a # In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572). # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# #
# In addition, I recommend the # In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're # [Solarized theme](https://github.com/altercation/solarized/) and, if you're
...@@ -88,9 +88,9 @@ prompt_git() { ...@@ -88,9 +88,9 @@ prompt_git() {
zstyle ':vcs_info:*' stagedstr '✚' zstyle ':vcs_info:*' stagedstr '✚'
zstyle ':vcs_info:git:*' unstagedstr '●' zstyle ':vcs_info:git:*' unstagedstr '●'
zstyle ':vcs_info:*' formats ' %u%c' zstyle ':vcs_info:*' formats ' %u%c'
zstyle ':vcs_info:*' actionformats '%u%c' zstyle ':vcs_info:*' actionformats ' %u%c'
vcs_info vcs_info
echo -n "${ref/refs\/heads\//± }${vcs_info_msg_0_}" echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }"
fi fi
} }
......
#
# Author:: Andrew Vit (<andrew@avit.ca>)
#
# AVIT ZSH Theme # AVIT ZSH Theme
#
# Copyright 2011, Andrew Vit
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
PROMPT=' PROMPT='
$(_user_host)${_current_dir} $(git_prompt_info) $(_ruby_version) $(_user_host)${_current_dir} $(git_prompt_info) $(_ruby_version)
......
...@@ -101,12 +101,12 @@ _1RIGHT="[%*] " ...@@ -101,12 +101,12 @@ _1RIGHT="[%*] "
bureau_precmd () { bureau_precmd () {
_1SPACES=`get_space $_1LEFT $_1RIGHT` _1SPACES=`get_space $_1LEFT $_1RIGHT`
echo print
print -rP "$_1LEFT$_1SPACES$_1RIGHT"
} }
setopt prompt_subst setopt prompt_subst
PROMPT='$_1LEFT$_1SPACES$_1RIGHT PROMPT='> $_LIBERTY '
> $_LIBERTY '
RPROMPT='$(nvm_prompt_info) $(bureau_git_prompt)' RPROMPT='$(nvm_prompt_info) $(bureau_git_prompt)'
autoload -U add-zsh-hook autoload -U add-zsh-hook
......
# neuralsanwich.zsh-theme # neuralsanwich.zsh-theme
#
# Author: Sean Jones
# URL: http://www.neuralsandwich.com
# Repo:
# Direct link:
# Create:
# Modified:
if [ "x$OH_MY_ZSH_HG" = "x" ]; then if [ "x$OH_MY_ZSH_HG" = "x" ]; then
OH_MY_ZSH_HG="hg" OH_MY_ZSH_HG="hg"
......
# ----------------------------------------------------------------------------- # dogenpunk.zsh-theme
# FILE: dogenpunk.zsh-theme
# DESCRIPTION: oh-my-zsh theme file.
# AUTHOR: Matthew Nelson (dogenpunk@gmail.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%}"
......
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