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.

104 lines
2.5 KiB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
3 years ago
  1. #!/bin/zsh
  2. if [[ "$(locale LC_CTYPE)" == "UTF-8" ]]; then
  3. setopt COMBINING_CHARS
  4. fi
  5. # Disable the log builtin, so we don't conflict with /usr/bin/log
  6. disable log
  7. export CASE_SENSITIVE="true"
  8. zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
  9. # Load colors
  10. autoload -U colors && colors
  11. PROMPT="%{$fg[blue]%}%1~ %{$fg[green]%}>%{$reset_color%} "
  12. # Automatically cd into typed directory.
  13. setopt autocd
  14. # Useful support for interacting with Terminal.app or other terminal programs
  15. [ -r "/etc/zshrc_$TERM_PROGRAM" ] && . "/etc/zshrc_$TERM_PROGRAM"
  16. # Load Git completion
  17. zstyle ':completion:*:*:git:*' script ~/.zsh/git-completion.bash
  18. fpath=(~/.zsh $fpath)
  19. # vi mode
  20. bindkey -v
  21. export KEYTIMEOUT=1
  22. # Use vim keys in tab complete menu:
  23. # bindkey -M menuselect 'h' vi-backward-char
  24. # bindkey -M menuselect 'k' vi-up-line-or-history
  25. # bindkey -M menuselect 'l' vi-forward-char
  26. # bindkey -M menuselect 'j' vi-down-line-or-history
  27. # bindkey -v '^?' backward-delete-char
  28. # Edit line in vim with ctrl-e:
  29. autoload edit-command-line; zle -N edit-command-line
  30. bindkey '^e' edit-command-line
  31. # Go up directory structures
  32. up () {
  33. cd $(printf "%0.0s../" $(seq 1 $1));
  34. }
  35. function cdv () {
  36. if [[ $(uname) == 'Darwin' ]]; then
  37. cd $(pbpaste)
  38. return
  39. fi
  40. cd $(xclip -selection clipboard -o)
  41. }
  42. function cdf () {
  43. cd $(find . -type d -print | fzf)
  44. }
  45. # Load aliases
  46. source ~/.config/aliasrc
  47. export EDITOR=nvim
  48. export GIT_EDITOR=nvim
  49. # Save command history
  50. HISTFILE=${ZDOTDIR:-$HOME}/.zsh_history
  51. HISTSIZE=99999999
  52. SAVEHIST=$HISTSIZE
  53. export PATH="~/.local/bin/:$PATH"
  54. if [[ $(uname) == 'Darwin' ]]; then
  55. fi
  56. export ANDROID_HOME="$HOME/Android/Sdk"
  57. if [[ $(uname) == 'Darwin' ]]; then
  58. export ANDROID_HOME="$HOME/Library/Android/sdk"
  59. export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
  60. fi
  61. export PATH="${PATH}:${ANDROID_HOME}/platform-tools:$ANDROID_HOME/cmdline-tools/latest/bin"
  62. # FNM variables
  63. export PATH="/run/user/1000/fnm_multishells/20590_1663546026606/bin":$PATH
  64. export FNM_MULTISHELL_PATH="/run/user/1000/fnm_multishells/20590_1663546026606"
  65. export FNM_VERSION_FILE_STRATEGY="local"
  66. export FNM_DIR="/home/tovi/.local/share/fnm"
  67. export FNM_LOGLEVEL="info"
  68. export FNM_NODE_DIST_MIRROR="https://nodejs.org/dist"
  69. export FNM_ARCH="x64"
  70. rehash
  71. export PHPCS_STANDARD=~/.config/phpcs.xml
  72. if [[ $(uname) == 'Darwin' ]]; then
  73. export HOMEBREW_NO_AUTO_UPDATE=1
  74. export PATH="/opt/homebrew/lib/ruby/gems/3.3.0:$PATH"
  75. export PATH="/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/gems/3.3.0:$PATH"
  76. eval "$(rbenv init - zsh)"
  77. fi