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