Skip to content

Instantly share code, notes, and snippets.

@andershammar
Created November 4, 2018 14:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andershammar/7f26fbc41d46558a9b5daf6b1b2b8749 to your computer and use it in GitHub Desktop.
Save andershammar/7f26fbc41d46558a9b5daf6b1b2b8749 to your computer and use it in GitHub Desktop.
My Bash config
# Shortcuts
alias g=git
alias h=history
# List directory shortcuts
alias l="ls -l"
alias la="ls -la"
# Add Homebrew `/usr/local/bin` and user `~/bin` to PATH
export PATH="/usr/local/bin:$PATH"
export PATH="$HOME/bin:$PATH"
# Load shell dotfiles
for file in ~/.{path,exports,aliases,functions}; do
[ -r "$file" ] && . "$file"
done
unset file
# Bash completion
[ -f /usr/local/etc/bash_completion ] && . /usr/local/etc/bash_completion
# Bash completion for aliases
complete -o bashdefault -o default -o nospace -F __git_wrap__git_main g
# Increase Bash history size and file size
export HISTSIZE=1000
export HISTFILESIZE=2000
# Omit duplicates and commands that begin with a space from history
export HISTCONTROL=ignoreboth
# Make vim the default editor
export EDITOR=vim
# Enable colorized output for ls
export CLICOLOR=1
# Locale settings
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# Golang
export GOPATH=$HOME/code/go
export PATH=$PATH:/usr/local/opt/go/libexec/bin
export PATH=$(go env GOPATH)/bin:$PATH
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment