zshrc 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # Lines configured by zsh-newuser-install
  2. HISTFILE=~/.histfile
  3. HISTSIZE=1000
  4. SAVEHIST=1000
  5. setopt appendhistory autocd extendedglob nomatch
  6. bindkey -e
  7. # End of lines configured by zsh-newuser-install
  8. # The following lines were added by compinstall
  9. zstyle :compinstall filename '/home/josh/.zshrc'
  10. autoload -Uz compinit
  11. compinit
  12. # End of lines added by compinstall
  13. # Use prompt colors (green for regular user, red for root)
  14. autoload -U colors && colors
  15. if [ "$(id -u)" != "0" ]; then
  16. PROMPT="%{$fg_bold[green]%}%n@%m %1~ $%{$reset_color%} "
  17. RPROMPT="[%{$fg_no_bold[yellow]%}%?%{$reset_color%}]"
  18. else
  19. PROMPT="%{$fg_bold[red]%}%n@%m %1~ #%{$reset_color%} "
  20. RPROMPT="[%{$fg_no_bold[yellow]%}%?%{$reset_color%}]"
  21. fi
  22. # ls pleasantness
  23. alias l='\ls --color=auto'
  24. alias ls='ls --color=auto'
  25. alias lsa='ls -a --color=auto'
  26. alias lls='ls -alh --color=auto'
  27. # apt-get aliases
  28. alias update='sudo apt-get update && sudo apt-get dist-upgrade'
  29. alias clean='sudo apt-get clean'
  30. # grep the entirety of the history
  31. alias hg='history 1 | grep'
  32. # Use vim as the default text editor
  33. export VISUAL=vim
  34. # Used to keep steam from throwing errors
  35. export SWT_GTK3=0
  36. # Home and End keysjump the the beginning/end of the command
  37. bindkey "^[OH" beginning-of-line
  38. bindkey "^[OF" end-of-line
  39. # Ctrl-Left and Ctrl-Right keys move between words
  40. bindkey ";5C" forward-word
  41. # bindkey "^[[C" forward-word
  42. bindkey ";5D" backward-word
  43. # bindkey "^[[D" backward-word
  44. # Used for X forwarding in Cygwin
  45. if [[ "$(uname -o)" != "GNU/Linux" ]]; then
  46. DISPLAY=:1.0
  47. fi
  48. # local folder in PATH for UE4
  49. export PATH=$HOME/bin:$PATH
  50. # Flags used for CS243 "Mechanics of Programming"
  51. alias gcc='gcc -std=c99 -Wall -ggdb -Wextra -pedantic'
  52. # devkitPro/devkitPPC sources
  53. export DEVKITPRO=/home/josh/devkitPro/
  54. export DEVKITPPC=/home/josh/devkitPro//devkitPPC
  55. # alias for vim muscle memory when quitting
  56. alias :q='exit'
  57. # eval used by thefuck
  58. if hash fuck 2>/dev/null; then
  59. eval $(thefuck --alias)
  60. fi
  61. # Instantly write history
  62. setopt -o sharehistory
  63. # Ignore duplicates in history
  64. setopt HIST_IGNORE_DUPS
  65. # timestamp alias for dates
  66. alias ts='date +%y-%m-%d'
  67. # zsh-syntax-highlighting (MUST BE AT THE BOTTOM OF THIS FILE)
  68. source ~/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh