diff options
Diffstat (limited to 'zsh')
| -rw-r--r-- | zsh/zshrc | 20 |
1 files changed, 17 insertions, 3 deletions
| @@ -17,6 +17,11 @@ function chpwd() { | |||
| 17 | done | 17 | done |
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | # Funktionen | ||
| 21 | function source_file() { | ||
| 22 | [[ ! -r "$1" ]] || source "$1" | ||
| 23 | } | ||
| 24 | |||
| 20 | # Optionen | 25 | # Optionen |
| 21 | setopt AUTO_PARAM_SLASH | 26 | setopt AUTO_PARAM_SLASH |
| 22 | unsetopt CASE_GLOB | 27 | unsetopt CASE_GLOB |
| @@ -25,9 +30,18 @@ setopt INC_APPEND_HISTORY | |||
| 25 | setopt SHARE_HISTORY | 30 | setopt SHARE_HISTORY |
| 26 | setopt HIST_IGNORE_ALL_DUPS | 31 | setopt HIST_IGNORE_ALL_DUPS |
| 27 | 32 | ||
| 28 | [[ ! -r /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh ]] || source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh | 33 | source_file "$HOME/.opam/opam-init/init.zsh" |
| 29 | [[ ! -r /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]] || source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh | 34 | |
| 30 | [[ ! -r "$HOME/.opam/opam-init/init.zsh" ]] || source "$HOME/.opam/opam-init/init.zsh" | 35 | case "$OSTYPE" in |
| 36 | darwin*) | ||
| 37 | source_file "/opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" | ||
| 38 | source_file "/opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh" | ||
| 39 | ;; | ||
| 40 | freebsd*) | ||
| 41 | source_file "/usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" | ||
| 42 | source_file "/usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh" | ||
| 43 | ;; | ||
| 44 | esac | ||
| 31 | 45 | ||
| 32 | bindkey -v | 46 | bindkey -v |
| 33 | export KEYTIMEOUT=1 | 47 | export KEYTIMEOUT=1 |
