.zshrc 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. set -o vi
  2. setopt prompt_subst # needs to be on so I can get the time updated on each recalculation of the prompt
  3. setopt cdablevars # be able to cd to strings contained in variables
  4. setopt histignorespace # if a command starts with a space, it is not added to the history
  5. setopt ignoreeof # do not exit with Ctrl-D
  6. setopt autopushd pushdminus pushdsilent pushdtohome #
  7. # escaped color codes
  8. TURQUOISE=""
  9. GREEN=""
  10. WHITE=""
  11. RED="" # I'd prefer a lighter shade of red, but whatever
  12. # functions
  13. get_git_branch() {
  14. git branch --list 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ ($RED\1$WHITE)/"
  15. }
  16. PS1='[$GREEN${$(date -d now +'%H:%M:%S')}$WHITE] ${PWD##}${$(get_git_branch)} $ '
  17. alias c=clear
  18. alias q=exit
  19. alias d="dirs -v"
  20. alias dup="st & disown"
  21. alias ls="ls --color"
  22. alias la="ls -la --color"
  23. alias lah="ls -lah --color"
  24. alias grep="grep --color"
  25. export torgglercom="~/suticlients/torgglercom/web/app/theme/chimica"
  26. #Stuff for work
  27. #Node version management
  28. export NVM_DIR="$HOME/.nvm"
  29. [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"