Amended
✅ Installs recommended plugins using a safe heredoc method
This commit is contained in:
@@ -86,7 +86,7 @@ update_fish() {
|
|||||||
read -rp "An update is available. Update Fish? (y/N): " confirm
|
read -rp "An update is available. Update Fish? (y/N): " confirm
|
||||||
[[ "$confirm" =~ ^[Yy]$ ]] && sudo apt install -y fish
|
[[ "$confirm" =~ ^[Yy]$ ]] && sudo apt install -y fish
|
||||||
else
|
else
|
||||||
echo "✅ Fish is already up to date."
|
echo "Fish is already up to date."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
dnf|yum)
|
dnf|yum)
|
||||||
@@ -95,7 +95,7 @@ update_fish() {
|
|||||||
read -rp "An update is available. Update Fish? (y/N): " confirm
|
read -rp "An update is available. Update Fish? (y/N): " confirm
|
||||||
[[ "$confirm" =~ ^[Yy]$ ]] && sudo $PKG_MGR update -y fish
|
[[ "$confirm" =~ ^[Yy]$ ]] && sudo $PKG_MGR update -y fish
|
||||||
else
|
else
|
||||||
echo "✅ Fish is already up to date."
|
echo "Fish is already up to date."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
pacman)
|
pacman)
|
||||||
@@ -104,7 +104,7 @@ update_fish() {
|
|||||||
read -rp "An update is available. Update Fish? (y/N): " confirm
|
read -rp "An update is available. Update Fish? (y/N): " confirm
|
||||||
[[ "$confirm" =~ ^[Yy]$ ]] && sudo pacman -S --noconfirm fish
|
[[ "$confirm" =~ ^[Yy]$ ]] && sudo pacman -S --noconfirm fish
|
||||||
else
|
else
|
||||||
echo "✅ Fish is already up to date."
|
echo "Fish is already up to date."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
brew)
|
brew)
|
||||||
@@ -113,7 +113,7 @@ update_fish() {
|
|||||||
read -rp "An update is available. Update Fish? (y/N): " confirm
|
read -rp "An update is available. Update Fish? (y/N): " confirm
|
||||||
[[ "$confirm" =~ ^[Yy]$ ]] && brew upgrade fish
|
[[ "$confirm" =~ ^[Yy]$ ]] && brew upgrade fish
|
||||||
else
|
else
|
||||||
echo "✅ Fish is already up to date."
|
echo "Fish is already up to date."
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -125,19 +125,19 @@ install_fisher() {
|
|||||||
mkdir -p ~/.config/fish/functions
|
mkdir -p ~/.config/fish/functions
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "🎣 Installing Fisher plugin manager..."
|
echo "Installing Fisher plugin manager..."
|
||||||
fish -c 'curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher'
|
fish -c 'curl -sL https://git.io/fisher | source && fisher install jorgebucaran/fisher'
|
||||||
}
|
}
|
||||||
|
|
||||||
# 🧩 Install recommended plugins
|
# 🧩 Install recommended plugins using heredoc
|
||||||
install_fish_plugins() {
|
install_fish_plugins() {
|
||||||
echo "🧩 Installing Fish plugins..."
|
echo "Installing recommended Fish plugins..."
|
||||||
fish -c "
|
|
||||||
fisher install jorgebucaran/fisher
|
fish <<'EOF'
|
||||||
fisher install jethrokuan/z
|
fisher install jethrokuan/z
|
||||||
fisher install ilancosman/tide
|
fisher install ilancosman/tide
|
||||||
fisher install jorgebucaran/nvm.fish
|
fisher install jorgebucaran/nvm.fish
|
||||||
"
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
# 🏁 Main script
|
# 🏁 Main script
|
||||||
@@ -145,7 +145,7 @@ detect_platform
|
|||||||
install_gpg_if_needed
|
install_gpg_if_needed
|
||||||
|
|
||||||
if command -v fish &>/dev/null; then
|
if command -v fish &>/dev/null; then
|
||||||
echo "✅ Fish shell is already installed."
|
echo "Fish shell is already installed."
|
||||||
update_fish
|
update_fish
|
||||||
else
|
else
|
||||||
install_fish
|
install_fish
|
||||||
@@ -156,9 +156,9 @@ read -rp "Do you want to install Fisher plugin manager and some plugins? (y/N):
|
|||||||
if [[ "$install_plugins" =~ ^[Yy]$ ]]; then
|
if [[ "$install_plugins" =~ ^[Yy]$ ]]; then
|
||||||
install_fisher
|
install_fisher
|
||||||
install_fish_plugins
|
install_fish_plugins
|
||||||
echo "🎉 Fisher and plugins installed!"
|
echo "Fisher and plugins installed!"
|
||||||
else
|
else
|
||||||
echo "👍 Skipping plugin installation."
|
echo "Skipping plugin installation."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✅ Fish shell setup complete on $OS!"
|
echo "✅ Fish shell setup complete on $OS!"
|
||||||
|
|||||||
Reference in New Issue
Block a user