-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc-utils
35 lines (30 loc) · 1.34 KB
/
.zshrc-utils
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
install_oh_my_zsh() {
print_header "Setting up Oh My Zsh"
if [ ! -d "$HOME/.oh-my-zsh" ]; then
echo "Installing Oh My Zsh..."
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
echo -e "${GREEN}✓${NC} Oh My Zsh installed"
else
echo -e "${GREEN}✓${NC} Oh My Zsh already installed"
fi
}
install_zsh_plugins() {
print_header "Installing ZSH plugins"
# Install zsh-autosuggestions
if [ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-autosuggestions" ]; then
echo "Installing zsh-autosuggestions..."
git clone https://github.com/zsh-users/zsh-autosuggestions "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}"/plugins/zsh-autosuggestions
echo -e "${GREEN}✓${NC} zsh-autosuggestions installed"
else
echo -e "${GREEN}✓${NC} zsh-autosuggestions already installed"
fi
# Install zsh-syntax-highlighting
if [ ! -d "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting" ]; then
echo "Installing zsh-syntax-highlighting..."
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}"/plugins/zsh-syntax-highlighting
echo -e "${GREEN}✓${NC} zsh-syntax-highlighting installed"
else
echo -e "${GREEN}✓${NC} zsh-syntax-highlighting already installed"
fi
}