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

This commit is contained in:
Bram Kelchtermans 2024-06-27 22:22:33 +02:00
parent 88c42a3dbd
commit 61c1899b5c
1 changed files with 35 additions and 0 deletions

View File

@ -3,6 +3,41 @@
# Exit immediately if a command exits with a non-zero status. # Exit immediately if a command exits with a non-zero status.
set -e set -e
# Default icon value (empty if not provided)
icon=""
# Function to display script usage
usage() {
echo "Usage: $0 [--icon <nerd font symbol>]"
exit 1
}
# Parse command-line options
while getopts ":i:-:" opt; do
case $opt in
i)
icon="$OPTARG"
;;
-)
case "${OPTARG}" in
icon=*)
icon="${OPTARG#*=}"
;;
*)
usage
;;
esac
;;
:)
echo "Option -$OPTARG requires an argument."
usage
;;
?)
usage
;;
esac
done
# Function to install Fish shell # Function to install Fish shell
install_fish() { install_fish() {
echo "Installing Fish shell..." echo "Installing Fish shell..."