forked from twe4ked/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig.sh
54 lines (47 loc) · 1.94 KB
/
config.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Custom configuraion, change these!
# There are more configuration options in ./shell/exports
# I am in the process of moving all configuration here.
export DOTFILES=~/.dotfiles # Find the this folder
export WORK=Ennova # Where I work (Sets up CDPATH)
export MACBOOK=true # Shows battery in zsh prompt if true
# The search path for the cd command.
# This is a colon-separated list of directories in which the shell looks for
# destination directories specified by the cd command.
export CDPATH="$CDPATH:$HOME/Hub/Projects"
# Source the dotfiles
source $DOTFILES/aliases/aliases.sh # Load all the alias files
source $DOTFILES/shell/functions.sh # Misc functions
source $DOTFILES/shell/exports.sh # Load exports
source $DOTFILES/shell/colours.sh # Colours
source $DOTFILES/shell/gup.sh # Smart pull function by @jasoncodes
if [ -f $DOTFILES/work.sh ]; then
source $DOTFILES/work.sh # Work related aliases etc.
fi
# Load custom shell scripts (zsh or bash)
if [ $SHELL = '/bin/bash' ]; then
source $DOTFILES/bash/config.sh
export WHAT_SHELL='Using '`echo $SHELL`' shell.'
else
if [ $SHELL = "/bin/zsh" ]; then
source $DOTFILES/zsh/config.sh
export WHAT_SHELL='Using '`echo $SHELL`' shell.'
else
export WHAT_SHELL=`echo $SHELL`' does not have a custom config.'
fi
fi
# Set Apple Terminal.app resume directory
# http://superuser.com/questions/313650/resume-zsh-terminal-os-x-lion/315029#315029
#if [[ $TERM_PROGRAM == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]] {
# function chpwd {
# local SEARCH=' '
# local REPLACE='%20'
# local PWD_URL="file://$HOSTNAME${PWD//$SEARCH/$REPLACE}"
# printf '\e]7;%s\a' $PWD_URL
# }
# chpwd
#}
echo 'Custom config successfully loaded. '$WHAT_SHELL
# Ensure that rvm is the last thing sourced in all of your shell profiles,
# especially PATH are set. Otherwise, the values you set be trampled when you
# switch rubies.
source ~/.dotfiles/shell/rvm.sh