refactor: Update starship.toml file path and fix icon parameter in setup.sh

This commit is contained in:
Bram Kelchtermans 2024-06-27 22:40:30 +02:00
parent 34dbd2dfea
commit 86d71a9718
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ overwrite_starship_toml() {
echo "Adding icon [$icon](bg:color_purple fg:color_white) to starship.toml..." echo "Adding icon [$icon](bg:color_purple fg:color_white) to starship.toml..."
# Escape special characters in icon variable for sed # Escape special characters in icon variable for sed
escaped_icon=$(printf '%s\n' "$icon" | sed -e 's/[]\/$*.^[]/\\&/g') escaped_icon=$(printf '%s\n' "$icon" | sed -e 's/[]\/$*.^[]/\\&/g')
sed -i "5i\[$escaped_icon](fg:color_white bg:color_purple) \\" ~/.config/starship.toml sed -i "5i\[$escaped_icon](fg:color_white bg:color_purple) \\\\" ~/.config/starship.toml
fi fi
else else