You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
2.2 KiB

9 years ago
9 years ago
  1. #
  2. # Using Oh My ZSH
  3. # https://github.com/robbyrussell/oh-my-zsh
  4. #
  5. export ZSH=$HOME/.oh-my-zsh
  6. # Best theme ever!
  7. ZSH_THEME="ys"
  8. # System variables for tmux configuration
  9. export ZSH_TMUX_AUTOSTART=false
  10. export ZSH_TMUX_AUTOSTART_ONCE=true
  11. # Used zsh plugins
  12. plugins=(archlinux systemd common-aliases history screen tmux wd git git-extras mercurial)
  13. # Let's update and do other goodness
  14. source $ZSH/oh-my-zsh.sh
  15. # Make sure we're in en_us UTF8
  16. export LANG=en_US.UTF-8
  17. # All Hail VIM
  18. export EDITOR='vim'
  19. # Make sure ~/bin is on the path
  20. export PATH="$HOME/bin:$PATH"
  21. # Add something to something else
  22. # $1 is the original value being appended to
  23. # $2 is the seperator
  24. # $3 is what we should add as long as it has some value
  25. function append_if_exists() {
  26. result="$1"
  27. if [ ! -z "$1" ] && [ ! -z "$2" ] && [ ! -z "$3" ]; then
  28. result="${result}${2}${3}"
  29. fi
  30. echo $result
  31. }
  32. # Alias to emacsclient
  33. alias ec="emacsclient"
  34. # Don't use the embedded shell time. Use GNU time.
  35. alias time="/usr/bin/time"
  36. # Alias for GNU Time with pretty output.
  37. alias ti="/usr/bin/time --format='Command:%C \nElapsed Time: %E\nUser Time: %U\nSystem Time: %S\nCPU: %P\nMax Memory: %MKb\nAverage Memory: %KKb\nAverage Unshared Memory: %DKb\nNumber of Swaps: %W\nNumber of Waits: %w\nExit Status: %x'"
  38. if [ -d "$HOME/.linuxbrew" ]; then
  39. export PATH="$HOME/.linuxbrew/bin:$PATH"
  40. export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
  41. export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
  42. fi
  43. # Go Setup
  44. export GOPATH="$HOME/go"
  45. export PATH="$PATH:$HOME/go/bin"
  46. # CL Setup
  47. # if SBCL is installed point to that path
  48. sbcl_bin="$(which sbcl 2> /dev/null | head -n 1)"
  49. if [[ ${sbcl_bin:0:4} != "sbcl" ]]; then
  50. # Handle a case where sbcl is not installed
  51. CL_BIN=$sbcl_bin
  52. fi
  53. if [ -f "$HOME/.update_dotfiles.sh" ]; then
  54. /usr/bin/env sh $HOME/.update_dotfiles.sh
  55. fi
  56. # rbenv setup
  57. # # doesn't work under msys
  58. if [ -d "$HOME/.rbenv" ] && [ -z "$MSYSTEM" ]; then
  59. export PATH="$HOME/.rbenv/bin:$PATH"
  60. eval "$(rbenv init -)"
  61. fi
  62. # MSYS Specific Configuration
  63. if [ ! -z "$MSYSTEM" ] && [[ "$MSYSTEM" == "MSYS" ]]; then
  64. # Make sure msys has our CL on the path
  65. export PATH=$(append_if_exists $PATH ":" $(dirname "$CL_BIN"))
  66. fi