Compare commits

...

1 Commits

Author SHA1 Message Date
d58e543c78 Improve & rename plugin sourcing function
Rename `plugin-load` to `source-plugin` and add a check for the plugin
directory, a message is displayed if it does not exist.
2018-04-22 12:15:38 +01:00

14
zshrc
View File

@ -2,10 +2,16 @@
# executing commands, will be sourced when starting as an interactive shell.
# Load plugin scripts
plugin-load() { source ~/.config/zsh/$1/$1.plugin.zsh }
plugin-load zsh-autosuggestions
plugin-load zsh-history-substring-search
plugin-load zsh-syntax-highlighting
source-plugin() {
if [ -d ~/.config/zsh/$1 ]; then
source ~/.config/zsh/$1/$1.plugin.zsh
else
echo "zsh plugin not found: $1"
fi
}
source-plugin zsh-autosuggestions
source-plugin zsh-history-substring-search
source-plugin zsh-syntax-highlighting
# Disable non end-of-line autosuggest accept widgets
ZSH_AUTOSUGGEST_ACCEPT_WIDGETS=(end-of-line vi-end-of-line)