ref(zsh): install zsh plugins from sourcer
This commit is contained in:
parent
6fbc7221cf
commit
60db2029a9
@ -2,9 +2,20 @@ so () {
|
||||
[ -f "$1" ] && source "$1"
|
||||
}
|
||||
|
||||
install_if_not_exists() {
|
||||
local path="$HOME/.subzsh/plugins/$1"
|
||||
if [ ! -d "$path" ]; then
|
||||
/usr/bin/git clone "https://github.com/$1" "$path"
|
||||
fi
|
||||
}
|
||||
|
||||
so ~/.subzsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
so ~/.subzsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
install_if_not_exists zsh-users/zsh-autosuggestions
|
||||
install_if_not_exists zsh-users/zsh-syntax-highlighting
|
||||
install_if_not_exists hlissner/zsh-autopair
|
||||
install_if_not_exists unixorn/fzf-zsh-plugin
|
||||
|
||||
so ~/.subzsh/plugins/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
so ~/.subzsh/plugins/zsh-users/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
so ~/.subzsh/plugins/hlissner/zsh-autopair/autopair.zsh
|
||||
so ~/.subzsh/plugins/unixorn/fzf-zsh-plugin/fzf-zsh-plugin.plugin.zsh
|
||||
so ~/.subzsh/plugins/dirhistory.zsh
|
||||
|
||||
7
install
7
install
@ -93,13 +93,6 @@ cmd_bash() {
|
||||
cmd_zsh() {
|
||||
|
||||
_link_files_in_sandbox ${TARGETS["zsh"]}
|
||||
|
||||
git clone https://github.com/zsh-users/zsh-autosuggestions "$SANDBOX_PATH/.subzsh/plugins/zsh-autosuggestions"
|
||||
git clone https://github.com/zsh-users/zsh-syntax-highlighting "$SANDBOX_PATH/.subzsh/plugins/zsh-syntax-highlighting"
|
||||
git clone https://github.com/hlissner/zsh-autopair "$SANDBOX_PATH/.subzsh/plugins/hlissner/zsh-autopair"
|
||||
git clone https://github.com/unixorn/fzf-zsh-plugin.git "$SANDBOX_PATH/.subzsh/plugins/unixorn/fzf-zsh-plugin" && \
|
||||
mkdir -p "$SANDBOX_PATH/.local/bin" && \
|
||||
ln -s "$SANDBOX_PATH"/.subzsh/plugins/unixorn/fzf-zsh-plugin/bin/* "$SANDBOX_PATH/.local/bin"
|
||||
__install_from_sandbox
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user