1
Fork 0
dots/zsh/dot-zshrc

28 lines
931 B
Text
Raw Normal View History

2023-08-21 09:56:16 +00:00
function create_dir() [ ! -d "$1" ] && mkdir -p "$1"
function safe_source() [ -f "$1" ] && source "$1"
function zsh_add_file() safe_source "$ZDOTDIR/$1"
2023-08-30 02:00:57 +00:00
function zsh_add_plugin() {
PLUGIN_NAME=$(echo $1 | cut -d "/" -f 2)
[ ! -d "$HOME/.local/share/zsh/plugins/$PLUGIN_NAME" ] &&
git clone "https://github.com/$1.git" "$HOME/.local/share/zsh/plugins/$PLUGIN_NAME"
safe_source "$HOME/.local/share/zsh/plugins/$PLUGIN_NAME/$PLUGIN_NAME.plugin.zsh"
safe_source "$HOME/.local/share/zsh/plugins/$PLUGIN_NAME/$PLUGIN_NAME.zsh"
}
2023-08-21 09:56:16 +00:00
zsh_add_file "zsh-aliases"
zsh_add_file "zsh-functions"
zsh_add_file "zsh-options"
zsh_add_plugin "Aloxaf/fzf-tab"
zsh_add_plugin "ahmubashshir/zinsults"
zsh_add_plugin "zdharma-continuum/fast-syntax-highlighting"
zsh_add_plugin "zsh-users/zsh-autosuggestions"
zsh_add_plugin "zsh-users/zsh-completions"
2023-08-30 21:45:02 +00:00
zsh_add_file "zsh-completion"
2023-08-30 02:00:57 +00:00
zsh_add_file "zsh-bindings"
2023-08-21 09:56:16 +00:00
# vim: filetype=zsh