Improve autoinstall
This commit is contained in:
parent
b5764c0376
commit
57cd02890a
8 changed files with 92 additions and 187 deletions
|
@ -7,7 +7,7 @@ then
|
|||
rm "$HOME/.zshrc"
|
||||
fi
|
||||
|
||||
autoinstall-packages
|
||||
autoinstall all
|
||||
|
||||
# Set name of the theme to load --- if set to "random", it will
|
||||
# load a random theme each time oh-my-zsh is loaded, in which case,
|
||||
|
@ -69,15 +69,13 @@ HIST_STAMPS="yyyy-mm-dd"
|
|||
# Would you like to use another custom folder than $ZSH/custom?
|
||||
ZSH_CUSTOM=$ZDOTDIR/custom
|
||||
|
||||
function omz_install_custom_plugin() {
|
||||
plugin_path="$ZSH_CUSTOM/plugins/$1"
|
||||
if [ ! -d "$plugin_path" ]
|
||||
then
|
||||
echo "Installing plugin $1"
|
||||
git clone "$2" "$plugin_path" >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
omz_install_custom_plugin "zsh-syntax-highlighting" "https://github.com/zsh-users/zsh-syntax-highlighting.git"
|
||||
plugin_path="$ZSH_CUSTOM/plugins"
|
||||
autoinstall git \
|
||||
"https://github.com/zsh-users/zsh-syntax-highlighting.git" \
|
||||
"$plugin_path/zsh-syntax-highlighting"
|
||||
autoinstall file \
|
||||
"https://gist.githubusercontent.com/oshybystyi/475ee7768efc03727f21/raw/4bfd57ef277f5166f3070f11800548b95a501a19/git-auto-status.plugin.zsh" \
|
||||
"$plugin_path/git-auto-status/git-auto-status.plugin.zsh"
|
||||
|
||||
|
||||
# Which plugins would you like to load?
|
||||
|
@ -120,6 +118,8 @@ export SAVEHIST=1000000
|
|||
export HISTSIZE=1000000
|
||||
export HISTFILE="$HOME/.cache/zsh_history"
|
||||
|
||||
source source-remote-file "dracula-syntax-highlighting" "https://raw.githubusercontent.com/dracula/zsh-syntax-highlighting/master/zsh-syntax-highlighting.sh"
|
||||
source source-remote-file \
|
||||
"https://raw.githubusercontent.com/dracula/zsh-syntax-highlighting/master/zsh-syntax-highlighting.sh" \
|
||||
"dracula-syntax-highlighting"
|
||||
|
||||
[ -x "$(command -v starship)" ] && eval "$(starship init zsh)"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue