diff options
| author | bozo.kopic <bozo@kopic.xyz> | 2022-12-21 15:56:47 +0100 |
|---|---|---|
| committer | bozo.kopic <bozo@kopic.xyz> | 2022-12-21 15:56:47 +0100 |
| commit | 677acf3e97a9fb1f6d3d61d6564ca35ffc140474 (patch) | |
| tree | 63d961962667e80f9d638808af5244f55a335d46 /shell | |
| parent | 51951dd784c2853f028097786d314bb385507e18 (diff) | |
.
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/zsh/.zshrc | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/shell/zsh/.zshrc b/shell/zsh/.zshrc index 261b166..96264ff 100644 --- a/shell/zsh/.zshrc +++ b/shell/zsh/.zshrc @@ -13,19 +13,24 @@ compinit . ~/.dotfiles/shell/zsh/zsh-git-prompt/zshrc.sh PROMPT='[%F{green}%n%f@%m %F{green}%~%f $(git_super_status)]$ ' -. ~/.dotfiles/shell/zsh/fzf/key-bindings.zsh - -. ~/.dotfiles/shell/zsh/broot.zsh - -. /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh -. /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh -. /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh - -bindkey '\e[1~' beginning-of-line # Home -bindkey '\e[4~' end-of-line # End -bindkey '\e[3~' delete-char # Delete -bindkey '^[[A' history-substring-search-up # Up -bindkey '^[[B' history-substring-search-down # Down +[ -n "$(command -v fzf)" ] && . ~/.dotfiles/shell/zsh/fzf/key-bindings.zsh + +[ -n "$(command -v broot)" ] && . ~/.dotfiles/shell/zsh/broot.zsh + +SYSTEM_PLUGINS=(/usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh + /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh + /usr/share/zsh/plugins/zsh-history-substring-search/zsh-history-substring-search.zsh) +for plugin in $SYSTEM_PLUGINS; do + [ -e "$plugin" ] && . $plugin +done + +bindkey '\e[1~' beginning-of-line # Home +bindkey '\e[4~' end-of-line # End +bindkey '\e[3~' delete-char # Delete +[ -n "$(command -v history-substring-search-up)" ] && \ + bindkey '^[[A' history-substring-search-up # Up +[ -n "$(command -v history-substring-search-down)" ] && \ + bindkey '^[[B' history-substring-search-down # Down bindkey '^[[1;5D' backward-word # Ctrl+Left bindkey '^[[1;5C' forward-word # Ctrl+Right |
