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.

77 lines
2.1 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. # Add something to something else
  20. # $1 is the original value being appended to
  21. # $2 is the seperator
  22. # $3 is what we should add as long as it has some value
  23. function append_if_exists() {
  24. result="$1"
  25. if [ ! -z "$1" ] && [ ! -z "$2" ] && [ ! -z "$3" ]; then
  26. result="${result}${2}${3}"
  27. fi
  28. echo $result
  29. }
  30. # Don't use the embedded shell time. Use GNU time.
  31. alias time="/usr/bin/time"
  32. # Alias for GNU Time with pretty output.
  33. 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'"
  34. if [ -d "$HOME/.linuxbrew" ]; then
  35. export PATH="$HOME/.linuxbrew/bin:$PATH"
  36. export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
  37. export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
  38. fi
  39. # Go Setup
  40. export GOPATH="$HOME/go"
  41. export PATH="$PATH:$HOME/go/bin"
  42. # CL Setup
  43. # if SBCL is installed point to that path
  44. sbcl_bin="$(which sbcl 2> /dev/null | head -n 1)"
  45. if [[ ${sbcl_bin:0:4} != "sbcl" ]]; then
  46. # Handle a case where sbcl is not installed
  47. CL_BIN=$sbcl_bin
  48. fi
  49. if [ -f "$HOME/.update_dotfiles.sh" ]; then
  50. /usr/bin/env sh $HOME/.update_dotfiles.sh
  51. fi
  52. # rbenv setup
  53. # # doesn't work under msys
  54. if [ -d "$HOME/.rbenv" ] && [ -z "$MSYSTEM" ]; then
  55. export PATH="$HOME/.rbenv/bin:$PATH"
  56. eval "$(rbenv init -)"
  57. fi
  58. # MSYS Specific Configuration
  59. if [ ! -z "$MSYSTEM" ] && [[ "$MSYSTEM" == "MSYS" ]]; then
  60. # Make sure msys has our CL on the path
  61. export PATH=$(append_if_exists $PATH ":" $(dirname "$CL_BIN"))
  62. fi