1
0
mirror of https://github.com/frebib/dotfiles.git synced 2024-06-14 12:57:23 +00:00

zsh: trysource various ZSH plugins

These vary by OS/distribution and even between devices depending on what
is installed. Most of these are optional anyway so make a best-effort
attempt to load them.

Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
Joe Groocock 2020-08-23 12:07:09 +01:00
parent c719fad76a
commit 5ace0bb7f4
Signed by: frebib
GPG Key ID: E0B16BEACFBB6A86

View File

@ -155,8 +155,12 @@ source "$XDG_CONFIG_HOME/aliases"
source "$ZSH_DIR/plugins/sudo.zsh" source "$ZSH_DIR/plugins/sudo.zsh"
source "$ZSH_DIR/plugins/fish-theme.zsh" source "$ZSH_DIR/plugins/fish-theme.zsh"
source "$ZSH_DIR/plugins/git-rprompt.zsh" source "$ZSH_DIR/plugins/git-rprompt.zsh"
[ -f '/usr/share/fzf/key-bindings.zsh' ] && source /usr/share/fzf/key-bindings.zsh
[ -f '/usr/share/doc/pkgfile/command-not-found.zsh' ] && source /usr/share/doc/pkgfile/command-not-found.zsh trysource() { [ -f "$1" ] && source "$1"; }
trysource /usr/share/fzf/key-bindings.zsh 2>&1 # Arch/sensible distros
trysource /usr/share/doc/fzf/examples/key-bindings.zsh 2>&1 # Debian, because Debian
trysource /usr/share/doc/pkgfile/command-not-found.zsh 2>&1 # pkgfile on Arch
trysource /usr/share/z/z.sh
# Completion initialisation # Completion initialisation
autoload -U compinit bashcompinit autoload -U compinit bashcompinit