Remove whitespace [Gun.io WhitespaceBot]

This commit is contained in:
Gun.io Whitespace Robot 2011-10-28 19:20:41 -04:00
commit c42205ffac
23 changed files with 72 additions and 72 deletions

View file

@ -39,6 +39,6 @@ alias rd=rmdir
alias d='dirs -v' alias d='dirs -v'
# mkdir & cd to it # mkdir & cd to it
function mcd() { function mcd() {
mkdir -p "$1" && cd "$1"; mkdir -p "$1" && cd "$1";
} }

View file

@ -4,7 +4,7 @@
#Limited support for Apple Terminal (Terminal can't set window or tab separately) #Limited support for Apple Terminal (Terminal can't set window or tab separately)
function title { function title {
[ "$DISABLE_AUTO_TITLE" != "true" ] || return [ "$DISABLE_AUTO_TITLE" != "true" ] || return
if [[ "$TERM" == screen* ]]; then if [[ "$TERM" == screen* ]]; then
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
print -Pn "\e]2;$2:q\a" #set window name print -Pn "\e]2;$2:q\a" #set window name

View file

@ -10,7 +10,7 @@ if [[ -x `which yaourt` ]]; then
# Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
alias yaupg='yaourt -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system. alias yaupg='yaourt -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system.
alias yain='yaourt -S' # Install specific package(s) from the repositories alias yain='yaourt -S' # Install specific package(s) from the repositories
alias yains='yaourt -U' # Install specific package not from the repositories but from a file alias yains='yaourt -U' # Install specific package not from the repositories but from a file
alias yare='yaourt -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies alias yare='yaourt -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
alias yarem='yaourt -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies alias yarem='yaourt -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
alias yarep='yaourt -Si' # Display information about a given package in the repositories alias yarep='yaourt -Si' # Display information about a given package in the repositories
@ -34,7 +34,7 @@ fi
# Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips
alias pacupg='sudo pacman -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system. alias pacupg='sudo pacman -Syu' # Synchronize with repositories before upgrading packages that are out of date on the local system.
alias pacin='sudo pacman -S' # Install specific package(s) from the repositories alias pacin='sudo pacman -S' # Install specific package(s) from the repositories
alias pacins='sudo pacman -U' # Install specific package not from the repositories but from a file alias pacins='sudo pacman -U' # Install specific package not from the repositories but from a file
alias pacre='sudo pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies alias pacre='sudo pacman -R' # Remove the specified package(s), retaining its configuration(s) and required dependencies
alias pacrem='sudo pacman -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies alias pacrem='sudo pacman -Rns' # Remove the specified package(s), its configuration(s) and unneeded dependencies
alias pacrep='pacman -Si' # Display information about a given package in the repositories alias pacrep='pacman -Si' # Display information about a given package in the repositories

View file

@ -7,7 +7,7 @@
if (( ${+commands[compleat]} )); then if (( ${+commands[compleat]} )); then
local prefix="${commands[compleat]:h:h}" local prefix="${commands[compleat]:h:h}"
local setup="${prefix}/share/compleat-1.0/compleat_setup" local setup="${prefix}/share/compleat-1.0/compleat_setup"
if [[ -f "$setup" ]]; then if [[ -f "$setup" ]]; then
if ! bashcompinit >/dev/null 2>&1; then if ! bashcompinit >/dev/null 2>&1; then
@ -15,6 +15,6 @@ if (( ${+commands[compleat]} )); then
bashcompinit -i bashcompinit -i
fi fi
source "$setup" source "$setup"
fi fi
fi fi

View file

@ -1,9 +1,9 @@
#!/bin/zsh #!/bin/zsh
# #
# Make the dirstack more persistant # Make the dirstack more persistant
# #
# Add dirpersist to $plugins in ~/.zshrc to load # Add dirpersist to $plugins in ~/.zshrc to load
# #
# $zdirstore is the file used to persist the stack # $zdirstore is the file used to persist the stack
zdirstore=~/.zdirstore zdirstore=~/.zdirstore

View file

@ -81,7 +81,7 @@ _managepy-reset(){
_managepy-runfcgi(){ _managepy-runfcgi(){
local state local state
local fcgi_opts local fcgi_opts
fcgi_opts=( fcgi_opts=(
'protocol[fcgi, scgi, ajp, ... (default fcgi)]:protocol:(fcgi scgi ajp)' 'protocol[fcgi, scgi, ajp, ... (default fcgi)]:protocol:(fcgi scgi ajp)'
@ -99,7 +99,7 @@ _managepy-runfcgi(){
'outlog[write stdout to this file.]:file:_files' 'outlog[write stdout to this file.]:file:_files'
'errlog[write stderr to this file.]:file:_files' 'errlog[write stderr to this file.]:file:_files'
) )
_arguments -s : \ _arguments -s : \
$nul_args \ $nul_args \
'*: :_values "FCGI Setting" $fcgi_opts' && ret=0 '*: :_values "FCGI Setting" $fcgi_opts' && ret=0
@ -159,7 +159,7 @@ _managepy-validate() {
_managepy-commands() { _managepy-commands() {
local -a commands local -a commands
commands=( commands=(
'adminindex:prints the admin-index template snippet for the given app name(s).' 'adminindex:prints the admin-index template snippet for the given app name(s).'
'createcachetable:creates the table needed to use the SQL cache backend.' 'createcachetable:creates the table needed to use the SQL cache backend.'
@ -189,7 +189,7 @@ _managepy-commands() {
'testserver:Runs a development server with data from the given fixture(s).' 'testserver:Runs a development server with data from the given fixture(s).'
'validate:Validates all installed models.' 'validate:Validates all installed models.'
) )
_describe -t commands 'manage.py command' commands && ret=0 _describe -t commands 'manage.py command' commands && ret=0
} }
@ -207,7 +207,7 @@ _applist() {
_managepy() { _managepy() {
local curcontext=$curcontext ret=1 local curcontext=$curcontext ret=1
if ((CURRENT == 2)); then if ((CURRENT == 2)); then
_managepy-commands _managepy-commands
else else

View file

@ -23,7 +23,7 @@ function extract() {
remove_archive=1 remove_archive=1
if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then
remove_archive=0 remove_archive=0
shift shift
fi fi
@ -64,10 +64,10 @@ function extract() {
cd ..; rm *.tar.gz debian-binary cd ..; rm *.tar.gz debian-binary
cd .. cd ..
;; ;;
(*) (*)
echo "extract: '$1' cannot be extracted" 1>&2 echo "extract: '$1' cannot be extracted" 1>&2
success=1 success=1
;; ;;
esac esac
(( success = $success > 0 ? $success : $? )) (( success = $success > 0 ? $success : $? ))

View file

@ -23,7 +23,7 @@ _knife() {
'4: :->knifesubcmd3' \ '4: :->knifesubcmd3' \
'5: :->knifesubcmd4' \ '5: :->knifesubcmd4' \
'6: :->knifesubcmd5' '6: :->knifesubcmd5'
case $state in case $state in
knifecmd) knifecmd)
compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" exec index node recipe role search ssh status windows $cloudproviders compadd -Q "$@" bootstrap client configure cookbook "cookbook site" "data bag" exec index node recipe role search ssh status windows $cloudproviders
@ -50,7 +50,7 @@ _knife() {
;; ;;
role) role)
compadd -Q "$@" "bulk delete" create delete edit "from file" list show compadd -Q "$@" "bulk delete" create delete edit "from file" list show
;; ;;
windows) windows)
compadd "$@" bootstrap compadd "$@" bootstrap
;; ;;
@ -117,8 +117,8 @@ _knife() {
else else
_arguments '*:Subsubcommands:($(_knife_options2))' _arguments '*:Subsubcommands:($(_knife_options2))'
fi fi
;; ;;
knifesubcmd5) knifesubcmd5)
_arguments '*:Subsubcommands:($(_knife_options3))' _arguments '*:Subsubcommands:($(_knife_options3))'
esac esac
} }

View file

@ -1,6 +1,6 @@
#compdef port #compdef port
local subcmds local subcmds
# we cache the list of ports # we cache the list of ports
# we shall use some cache policy to avoid problems with new ports # we shall use some cache policy to avoid problems with new ports
@ -31,8 +31,8 @@ subcmds=(
'file' 'file'
'help' 'help'
'info' 'info'
'install' 'install'
'installed' 'installed'
'list' 'list'
'livecheck' 'livecheck'
'location' 'location'
@ -48,7 +48,7 @@ subcmds=(
'test' 'test'
'unarchive' 'unarchive'
'uninstall' 'uninstall'
'upgrade' 'upgrade'
'variants' 'variants'
'version' 'version'
) )

View file

@ -27,7 +27,7 @@ alias latest-perl='curl -s http://www.perl.org/get.html | perl -wlne '\''if (/pe
# Functions ################################################################# # Functions #################################################################
# newpl - creates a basic Perl script file and opens it with $EDITOR # newpl - creates a basic Perl script file and opens it with $EDITOR
newpl () { newpl () {
# set $EDITOR to 'vim' if it is undefined # set $EDITOR to 'vim' if it is undefined
[[ -z $EDITOR ]] && EDITOR=vim [[ -z $EDITOR ]] && EDITOR=vim

View file

@ -34,7 +34,7 @@ _arguments -C \
case $state in case $state in
cmds) cmds)
cmds=( cmds=(
"version:show the rvm version installed in rvm_path" "version:show the rvm version installed in rvm_path"
"use:setup current shell to use a specific ruby version" "use:setup current shell to use a specific ruby version"
"reload:reload rvm source itself (useful after changing rvm source)" "reload:reload rvm source itself (useful after changing rvm source)"
@ -116,7 +116,7 @@ case $state in
if (( CURRENT == 3 )); then if (( CURRENT == 3 )); then
_values 'package_commands' \ _values 'package_commands' \
'install' \ 'install' \
'uninstall' 'uninstall'
else else
_values 'packages' \ _values 'packages' \
'readline' \ 'readline' \

View file

@ -34,7 +34,7 @@ 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... echo starting...
/usr/bin/ssh-add $HOME/.ssh/${^identities} /usr/bin/ssh-add $HOME/.ssh/${^identities}
} }

View file

@ -15,7 +15,7 @@ function in_svn() {
function svn_get_repo_name { function svn_get_repo_name {
if [ in_svn ]; then if [ in_svn ]; then
svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT
svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | sed "s/\/.*$//" svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | sed "s/\/.*$//"
fi fi
} }
@ -29,9 +29,9 @@ function svn_get_rev_nr {
function svn_dirty_choose { function svn_dirty_choose {
if [ in_svn ]; then if [ in_svn ]; then
s=$(svn status|grep -E '^\s*[ACDIM!?L]' 2>/dev/null) s=$(svn status|grep -E '^\s*[ACDIM!?L]' 2>/dev/null)
if [ $s ]; then if [ $s ]; then
echo $1 echo $1
else else
echo $2 echo $2
fi fi
fi fi

View file

@ -1,4 +1,4 @@
#compdef vagrant #compdef vagrant
#autoload #autoload
# vagrant zsh completion # vagrant zsh completion
@ -64,7 +64,7 @@ __vagrant-box ()
(options) (options)
case $line[1] in case $line[1] in
(repackage|remove) (repackage|remove)
_arguments ':feature:__box_list' _arguments ':feature:__box_list'
;; ;;
esac esac
;; ;;
@ -93,7 +93,7 @@ case $state in
(options) (options)
case $line[1] in case $line[1] in
(help) (help)
_arguments ':feature:__task_list' _arguments ':feature:__task_list'
;; ;;
(box) (box)

View file

@ -5,10 +5,10 @@ ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[white]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%})"
# Text to display if the branch is dirty # Text to display if the branch is dirty
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
# Text to display if the branch is clean # Text to display if the branch is clean
ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_CLEAN=""
# Colors vary depending on time lapsed. # Colors vary depending on time lapsed.
ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}" ZSH_THEME_GIT_TIME_SINCE_COMMIT_SHORT="%{$fg[green]%}"
@ -35,7 +35,7 @@ function rvm_gemset() {
GEMSET=`rvm gemset list | grep '=>' | cut -b4-` GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
if [[ -n $GEMSET ]]; then if [[ -n $GEMSET ]]; then
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|" echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
fi fi
} }
@ -53,12 +53,12 @@ function git_time_since_commit() {
# Totals # Totals
MINUTES=$((seconds_since_last_commit / 60)) MINUTES=$((seconds_since_last_commit / 60))
HOURS=$((seconds_since_last_commit/3600)) HOURS=$((seconds_since_last_commit/3600))
# Sub-hours and sub-minutes # Sub-hours and sub-minutes
DAYS=$((seconds_since_last_commit / 86400)) DAYS=$((seconds_since_last_commit / 86400))
SUB_HOURS=$((HOURS % 24)) SUB_HOURS=$((HOURS % 24))
SUB_MINUTES=$((MINUTES % 60)) SUB_MINUTES=$((MINUTES % 60))
if [[ -n $(git status -s 2> /dev/null) ]]; then if [[ -n $(git status -s 2> /dev/null) ]]; then
if [ "$MINUTES" -gt 30 ]; then if [ "$MINUTES" -gt 30 ]; then
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG" COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"

View file

@ -1,5 +1,5 @@
#RVM settings #RVM settings
if [[ -s ~/.rvm/scripts/rvm ]] ; then if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1" RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
fi fi

View file

@ -12,7 +12,7 @@ git_custom_status() {
} }
#RVM and git settings #RVM and git settings
if [[ -s ~/.rvm/scripts/rvm ]] ; then if [[ -s ~/.rvm/scripts/rvm ]] ; then
RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1' RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1'
fi fi

View file

@ -5,15 +5,15 @@ function precmd {
### ###
# Truncate the path if it's too long. # Truncate the path if it's too long.
PR_FILLBAR="" PR_FILLBAR=""
PR_PWDLEN="" PR_PWDLEN=""
local promptsize=${#${(%):---(%n@%m:%l)---()--}} local promptsize=${#${(%):---(%n@%m:%l)---()--}}
local rubyprompt=`rvm_prompt_info` local rubyprompt=`rvm_prompt_info`
local rubypromptsize=${#${rubyprompt}} local rubypromptsize=${#${rubyprompt}}
local pwdsize=${#${(%):-%~}} local pwdsize=${#${(%):-%~}}
if [[ "$promptsize + $rubypromptsize + $pwdsize" -gt $TERMWIDTH ]]; then if [[ "$promptsize + $rubypromptsize + $pwdsize" -gt $TERMWIDTH ]]; then
((PR_PWDLEN=$TERMWIDTH - $promptsize)) ((PR_PWDLEN=$TERMWIDTH - $promptsize))
else else
@ -69,7 +69,7 @@ setprompt () {
### ###
# See if we can use extended characters to look nicer. # See if we can use extended characters to look nicer.
typeset -A altchar typeset -A altchar
set -A altchar ${(s..)terminfo[acsc]} set -A altchar ${(s..)terminfo[acsc]}
PR_SET_CHARSET="%{$terminfo[enacs]%}" PR_SET_CHARSET="%{$terminfo[enacs]%}"
@ -81,10 +81,10 @@ setprompt () {
PR_LRCORNER=${altchar[j]:--} PR_LRCORNER=${altchar[j]:--}
PR_URCORNER=${altchar[k]:--} PR_URCORNER=${altchar[k]:--}
### ###
# Decide if we need to set titlebar text. # Decide if we need to set titlebar text.
case $TERM in case $TERM in
xterm*) xterm*)
PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}' PR_TITLEBAR=$'%{\e]0;%(!.-=*[ROOT]*=- | .)%n@%m:%~ | ${COLUMNS}x${LINES} | %y\a%}'
@ -96,8 +96,8 @@ setprompt () {
PR_TITLEBAR='' PR_TITLEBAR=''
;; ;;
esac esac
### ###
# Decide whether to set a screen title # Decide whether to set a screen title
if [[ "$TERM" == "screen" ]]; then if [[ "$TERM" == "screen" ]]; then
@ -105,8 +105,8 @@ setprompt () {
else else
PR_STITLE='' PR_STITLE=''
fi fi
### ###
# Finally, the prompt. # Finally, the prompt.

View file

@ -15,7 +15,7 @@ function josh_prompt {
branch_size=${#branch} branch_size=${#branch}
ruby_size=${#ruby_version} ruby_size=${#ruby_version}
user_machine_size=${#${(%):-%n@%m-}} user_machine_size=${#${(%):-%n@%m-}}
if [[ ${#branch} -eq 0 ]] if [[ ${#branch} -eq 0 ]]
then (( ruby_size = ruby_size + 1 )) then (( ruby_size = ruby_size + 1 ))
else else
@ -24,15 +24,15 @@ function josh_prompt {
(( branch_size = branch_size + 2 )) (( branch_size = branch_size + 2 ))
fi fi
fi fi
(( spare_width = ${spare_width} - (${user_machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) )) (( spare_width = ${spare_width} - (${user_machine_size} + ${path_size} + ${branch_size} + ${ruby_size}) ))
while [ ${#prompt} -lt $spare_width ]; do while [ ${#prompt} -lt $spare_width ]; do
prompt=" $prompt" prompt=" $prompt"
done done
prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)" prompt="%{%F{green}%}$PWD$prompt%{%F{red}%}$(rvm_prompt_info)%{$reset_color%} $(git_prompt_info)"
echo $prompt echo $prompt
} }

View file

@ -47,7 +47,7 @@ prompt_jnrowe_precmd () {
#dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/" #dir_status="$c1%n%F{7}@%F{9}%m%F{7}:%F{12}%/"
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
#dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})" #dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$foopath%} %{$c0%}(%{$c5%}%?%{$c0%})"
PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%} PROMPT='%{$fg_bold[green]%}%p%{$reset_color%}${vcs_info_msg_0_}${dir_status} ${ret_status}%{$reset_color%}
> ' > '
elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then elif [[ $(git diff --cached --name-status 2>/dev/null ) != "" ]]; then
@ -55,7 +55,7 @@ prompt_jnrowe_precmd () {
PROMPT='${vcs_info_msg_0_} PROMPT='${vcs_info_msg_0_}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%} %{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
> ' > '
elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then elif [[ $(git diff --name-status 2>/dev/null ) != "" ]]; then
dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})" dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$c4%}%/ %{$c0%}(%{$c5%}%?%{$c0%})"
@ -67,7 +67,7 @@ prompt_jnrowe_precmd () {
PROMPT='${vcs_info_msg_0_} PROMPT='${vcs_info_msg_0_}
%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%} %{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%}
> ' > '
fi fi
} }

View file

@ -1,6 +1,6 @@
# /|/ Code by Stephen # /|/ Code by Stephen
# /|/ "Rixius" Middleton # /|/ "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 {

View file

@ -10,7 +10,7 @@
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%}"
local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}"
PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%})%{$reset_color%} ' PROMPT='%{$fg[cyan]%}%c$(git_prompt_info) %(!.%{$fg_bold[red]%}#.%{$fg_bold[green]%})%{$reset_color%} '
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[blue]%}git%{$reset_color%}:%{$fg[red]%}"
@ -26,10 +26,10 @@ if [[ "$TERM" != "dumb" ]] && [[ "$DISABLE_LS_COLORS" != "true" ]]; then
ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜" ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[magenta]%} ➜"
ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═" ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[yellow]%} ═"
ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} ✭"
else else
MODE_INDICATOR="" MODE_INDICATOR=""
local return_status="%(?::⏎)" local return_status="%(?::⏎)"
PROMPT='%c$(git_prompt_info) %(!.#.) ' PROMPT='%c$(git_prompt_info) %(!.#.) '
ZSH_THEME_GIT_PROMPT_PREFIX=" git:" ZSH_THEME_GIT_PROMPT_PREFIX=" git:"

View file

@ -5,9 +5,9 @@
# - Place that bundle in ~/Library/Application\ Support/SIMBL/Plugins (create that folder if it doesn't exist) # - Place that bundle in ~/Library/Application\ Support/SIMBL/Plugins (create that folder if it doesn't exist)
# - Open Terminal preferences. Go to Settings -> Text -> More # - Open Terminal preferences. Go to Settings -> Text -> More
# - Change default colours to your liking. # - Change default colours to your liking.
# #
# Here are the colours from Textmate's Monokai theme: # Here are the colours from Textmate's Monokai theme:
# #
# Black: 0, 0, 0 # Black: 0, 0, 0
# Red: 229, 34, 34 # Red: 229, 34, 34
# Green: 166, 227, 45 # Green: 166, 227, 45
@ -28,7 +28,7 @@ PROMPT='%{$fg[magenta]%}[%c] %{$reset_color%}'
RPROMPT='${time} %{$fg[magenta]%}$(git_prompt_info)%{$reset_color%}$(git_prompt_status)%{$reset_color%}' RPROMPT='${time} %{$fg[magenta]%}$(git_prompt_info)%{$reset_color%}$(git_prompt_status)%{$reset_color%}'
# Add this at the start of RPROMPT to include rvm info showing ruby-version@gemset-name # Add this at the start of RPROMPT to include rvm info showing ruby-version@gemset-name
# %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%} # %{$fg[yellow]%}$(~/.rvm/bin/rvm-prompt)%{$reset_color%}
# local time, color coded by last return code # local time, color coded by last return code
time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}" time_enabled="%(?.%{$fg[green]%}.%{$fg[red]%})%*%{$reset_color%}"
@ -49,7 +49,7 @@ ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%} ♒" # ⓤ ⑊
# More symbols to choose from: # More symbols to choose from:
# ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷ # ☀ ✹ ☄ ♆ ♀ ♁ ♐ ♇ ♈ ♉ ♚ ♛ ♜ ♝ ♞ ♟ ♠ ♣ ⚢ ⚲ ⚳ ⚴ ⚥ ⚤ ⚦ ⚒ ⚑ ⚐ ♺ ♻ ♼ ☰ ☱ ☲ ☳ ☴ ☵ ☶ ☷
# ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠ # ✡ ✔ ✖ ✚ ✱ ✤ ✦ ❤ ➜ ➟ ➼ ✂ ✎ ✐ ⨀ ⨁ ⨂ ⨍ ⨎ ⨏ ⨷ ⩚ ⩛ ⩡ ⩱ ⩲ ⩵ ⩶ ⨠
# ⬅ ⬆ ⬇ ⬈ ⬉ ⬊ ⬋ ⬒ ⬓ ⬔ ⬕ ⬖ ⬗ ⬘ ⬙ ⬟ ⬤ 〒 ǀ ǁ ǂ ĭ Ť Ŧ # ⬅ ⬆ ⬇ ⬈ ⬉ ⬊ ⬋ ⬒ ⬓ ⬔ ⬕ ⬖ ⬗ ⬘ ⬙ ⬟ ⬤ 〒 ǀ ǁ ǂ ĭ Ť Ŧ
# Determine if we are using a gemset. # Determine if we are using a gemset.
@ -57,7 +57,7 @@ function rvm_gemset() {
GEMSET=`rvm gemset list | grep '=>' | cut -b4-` GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
if [[ -n $GEMSET ]]; then if [[ -n $GEMSET ]]; then
echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|" echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
fi fi
} }
# Determine the time since last commit. If branch is clean, # Determine the time since last commit. If branch is clean,
@ -74,12 +74,12 @@ function git_time_since_commit() {
# Totals # Totals
MINUTES=$((seconds_since_last_commit / 60)) MINUTES=$((seconds_since_last_commit / 60))
HOURS=$((seconds_since_last_commit/3600)) HOURS=$((seconds_since_last_commit/3600))
# Sub-hours and sub-minutes # Sub-hours and sub-minutes
DAYS=$((seconds_since_last_commit / 86400)) DAYS=$((seconds_since_last_commit / 86400))
SUB_HOURS=$((HOURS % 24)) SUB_HOURS=$((HOURS % 24))
SUB_MINUTES=$((MINUTES % 60)) SUB_MINUTES=$((MINUTES % 60))
if [[ -n $(git status -s 2> /dev/null) ]]; then if [[ -n $(git status -s 2> /dev/null) ]]; then
if [ "$MINUTES" -gt 30 ]; then if [ "$MINUTES" -gt 30 ]; then
COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG" COLOR="$ZSH_THEME_GIT_TIME_SINCE_COMMIT_LONG"