parent
f2a826e963
commit
a3c9530ab7
@ -1,11 +1,101 @@
|
||||
# Sourced on all invocations of shell unless -f option is set
|
||||
# Command Search Path
|
||||
# Important Environment Variables
|
||||
# Do not produce output
|
||||
# Do not assume tty
|
||||
#
|
||||
# Defines environment variables.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
# $ZDOTDIR/.zshenv
|
||||
# $ZDOTDIR/.zprofile
|
||||
# $ZDOTDIR/.zshrc
|
||||
# $ZDOTDIR/.zlogin
|
||||
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
# Ensure that a non-login, non-interactive shell has a defined environment.
|
||||
if [[ "$SHLVL" -eq 1 && ! -o LOGIN && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
||||
source "${ZDOTDIR:-$HOME}/.zprofile"
|
||||
declare UNAME_S=`/usr/bin/uname -s`
|
||||
declare UNAME_M=`/usr/bin/uname -m`
|
||||
declare UNAME_N=`/usr/bin/uname -n`
|
||||
|
||||
# Setup path
|
||||
path=(
|
||||
$HOME/Library/Scripts/bin/`/usr/bin/uname -s`/`/usr/bin/uname -m`
|
||||
$HOME/Library/Scripts/bin/`/usr/bin/uname -s`
|
||||
$HOME/Library/Scripts/sh
|
||||
$HOME/Library/Python/bin
|
||||
/opt/local/bin /usr/local/bin /usr/bin /bin
|
||||
/opt/local/sbin /usr/local/sbin /usr/sbin /sbin
|
||||
/usr/X11R6/bin
|
||||
/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin
|
||||
)
|
||||
|
||||
if [ -d $HOME/.rvm/bin ]; then
|
||||
path=($path $HOME/.rvm/bin)
|
||||
fi
|
||||
|
||||
# Go
|
||||
if [ -d /usr/local/go/bin ]; then
|
||||
path=($path /usr/local/go/bin)
|
||||
declare -x GOPATH="/Users/lanhel/Developer/SpaceMonkey/katamari/go"
|
||||
fi
|
||||
|
||||
|
||||
# Setup MANPATH
|
||||
manpath=(
|
||||
$HOME/man
|
||||
/opt/local/man
|
||||
/usr/local/share/man
|
||||
/usr/local/man
|
||||
/usr/share/man
|
||||
/usr/man
|
||||
)
|
||||
|
||||
# Set the the list of directories that cd searches.
|
||||
# cdpath=(
|
||||
# $cdpath
|
||||
# )
|
||||
# Setup file creation mask
|
||||
#umask 077
|
||||
|
||||
# Setup by operating system type
|
||||
case $UNAME_S in
|
||||
Darwin)
|
||||
path=($path /System/Applications /Applications)
|
||||
|
||||
declare -x MANPATH=`echo $MANPATH | sed 's*'$HOME/man'*'$HOME/Library/man'*g'`
|
||||
;;
|
||||
|
||||
linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup by processor type
|
||||
case $UNAME_M in
|
||||
powerpc)
|
||||
;;
|
||||
|
||||
i386)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup by host name
|
||||
case $UNAME_N in
|
||||
helsten)
|
||||
;;
|
||||
|
||||
pfiefferhorn)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup by subsystem
|
||||
for f in `find $HOME/Library/Scripts/config -name '*.shenv' -print`; do
|
||||
source "$f"
|
||||
done
|
||||
|
||||
# Ensure path arrays do not contain duplicates
|
||||
typeset -gU cdpath fpath mailpath path
|
||||
|
||||
# Cleanup
|
||||
unset UNAME_S
|
||||
unset UNAME_M
|
||||
unset UNAME_N
|
||||
|
||||
|
||||
|
@ -1,13 +1,87 @@
|
||||
# Sourced for interactive shells
|
||||
# Set up aliases, functions, options, key bindings, etc.
|
||||
# Do not produce output
|
||||
#
|
||||
# Executes commands at the start of an interactive session.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
# $ZDOTDIR/.zshenv
|
||||
# $ZDOTDIR/.zprofile
|
||||
# $ZDOTDIR/.zshrc
|
||||
# $ZDOTDIR/.zlogin
|
||||
#
|
||||
# http://zsh.sourceforge.net
|
||||
|
||||
# Source Prezto.
|
||||
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
|
||||
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"
|
||||
else
|
||||
# Setup Prompt
|
||||
declare PS1='%(!,%S%F{red},%F{green})%m:%!(%L)%#%(!,%s%f,%f) '
|
||||
#declare PS1="\[\033[1;30m\][\[\033[1;34m\]\$(date +%H:%M) \u\[\033[1;30m\]@\[\033[0;35m\]\h\[\033[1;30m\]] \[\033[0;37m\]\W \[\033[1;30m\]\$\[\033[0m\] "
|
||||
#PS1=$'%{\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%}%?$(retcode)%{\e[0;34m%}%B]%{\e[0m%}%b '
|
||||
declare RPS1='%DT%*'
|
||||
fi
|
||||
|
||||
set -o vi
|
||||
|
||||
# General Settings
|
||||
declare -x CALENDAR_DIR="/usr/share/calendar"
|
||||
declare HISTFILESIZE='50'
|
||||
declare HISTSIZE='50'
|
||||
|
||||
#aliases
|
||||
alias c="clear; clear; dirs"
|
||||
alias ls="ls -FGh"
|
||||
alias su="su -m"
|
||||
alias ping="ping -c 4"
|
||||
alias sed="sed -E"
|
||||
alias grep="grep -nHEI --color --exclude-dir=\.git --exclude-dir=\.hg --exclude-dir=\.svn --exclude-dir=build --exclude-dir=dist --exclude=tags"
|
||||
|
||||
if [ "$ZSH_VERSION" ]; then
|
||||
autoload -U compinit
|
||||
compinit
|
||||
|
||||
# cd hook
|
||||
autoload -U add-zsh-hook
|
||||
load-local-conf() {
|
||||
# check file exists, is regular file and is readable:
|
||||
if [[ -f .sh_source && -r .sh_source ]]; then
|
||||
source .sh_source
|
||||
fi
|
||||
}
|
||||
add-zsh-hook chpwd load-local-conf
|
||||
fi
|
||||
|
||||
# Customize to your needs...
|
||||
# Setup by operating system type
|
||||
case `/usr/bin/uname -s` in
|
||||
Darwin)
|
||||
alias psql_start="sudo -u _postgres /opt/local/bin/pg_ctl -D /opt/local/var/db/pgsql/data start"
|
||||
alias psql_stop="sudo -u _postgres /opt/local/bin/pg_ctl -D /opt/local/var/db/pgsql/data stop"
|
||||
;;
|
||||
|
||||
linux*)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup by processor type
|
||||
case `/usr/bin/uname -m` in
|
||||
powerpc)
|
||||
;;
|
||||
|
||||
i386)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup by host name
|
||||
case `/usr/bin/uname -n` in
|
||||
helsten)
|
||||
;;
|
||||
|
||||
pfiefferhorn)
|
||||
;;
|
||||
esac
|
||||
|
||||
# Setup by subsystem
|
||||
for f in `find $HOME/Library/Scripts/config -name '*.shrc'`; do
|
||||
source "$f"
|
||||
done
|
||||
|
||||
|
Loading…
Reference in new issue