Reorganize bash config.
This commit is contained in:
parent
1949caff33
commit
e5a21d53ac
21
bash_profile
21
bash_profile
@ -30,14 +30,17 @@ done
|
|||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
export LANG="en_US"
|
export LANG="en_US"
|
||||||
|
|
||||||
# Add ~/bin to the $PATH
|
# Extend $PATH
|
||||||
export PATH="$HOME/bin:/usr/local/bin:$PATH"
|
[ -d ~/bin ] && PATH="~/bin:$PATH"
|
||||||
# Add brew coreutils to $PATH
|
PATH="/usr/local/bin:$PATH"
|
||||||
command -v brew >/dev/null 2>&1 && export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
|
command -v brew >/dev/null 2>&1 && PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"
|
||||||
|
export PATH
|
||||||
|
|
||||||
# Load ~/.extra, ~/.bash_prompt and ~/.bash_aliases
|
# Load extra (private) settings
|
||||||
# ~/.extra can be used for settings you don’t want to commit
|
[ -r "~/.extra" ] && source "~/.extra"
|
||||||
for file in ~/.{extra,bash_prompt,bash_aliases}; do
|
|
||||||
|
# Load prompt and aliases
|
||||||
|
for file in ~/dotfiles/includes/{bash_prompt,bash_aliases,bash_functions}; do
|
||||||
[ -r "$file" ] && source "$file"
|
[ -r "$file" ] && source "$file"
|
||||||
done
|
done
|
||||||
unset file
|
unset file
|
||||||
@ -49,10 +52,10 @@ unset file
|
|||||||
command -v brew >/dev/null 2>&1 && [ -r "$(brew --prefix)/etc/bash_completion" ] && source "$(brew --prefix)/etc/bash_completion"
|
command -v brew >/dev/null 2>&1 && [ -r "$(brew --prefix)/etc/bash_completion" ] && source "$(brew --prefix)/etc/bash_completion"
|
||||||
|
|
||||||
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
|
# Add tab completion for SSH hostnames based on ~/.ssh/config, ignoring wildcards
|
||||||
[ -e "$HOME/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh
|
[ -e "~/.ssh/config" ] && complete -o "default" -o "nospace" -W "$(grep "^Host" ~/.ssh/config | grep -v "[?*]" | cut -d " " -f2)" scp sftp ssh
|
||||||
|
|
||||||
# Nano is default editor
|
# Nano is default editor
|
||||||
export EDITOR='nano';
|
export EDITOR='nano'
|
||||||
|
|
||||||
# Tell ls to be colourful
|
# Tell ls to be colourful
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
|
@ -486,6 +486,7 @@ defaults write com.google.Chrome.canary ExtensionInstallSources -array "https://
|
|||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
# Link Sublime Text 2 command line
|
# Link Sublime Text 2 command line
|
||||||
|
[ ! -d ~/bin ] && mkdir ~/bin
|
||||||
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
|
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" ~/bin/subl
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user