Update fastfetch-setup.sh - added support for other shells

This commit is contained in:
mateuszkozako 2025-01-22 10:27:50 +01:00 committed by GitHub
parent d918dbdbab
commit d52af3fafb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,6 +48,12 @@ setupFastfetchShell() {
"zsh") "zsh")
rc_file="$HOME/.zshrc" rc_file="$HOME/.zshrc"
;; ;;
"fish")
rc_file="$HOME/.config/fish/config.fish"
;;
"nu")
rc_file="$HOME/.config/nushell/config.nu"
;;
*) *)
printf "%b\n" "${RED}$current_shell is not supported. Update your shell configuration manually.${RC}" printf "%b\n" "${RED}$current_shell is not supported. Update your shell configuration manually.${RC}"
;; ;;
@ -62,7 +68,6 @@ setupFastfetchShell() {
else else
printf "%b" "${GREEN}Would you like to add fastfetch to $rc_file? [y/N] ${RC}" printf "%b" "${GREEN}Would you like to add fastfetch to $rc_file? [y/N] ${RC}"
read -r response read -r response
if [ "$response" = "y" ] || [ "$response" = "Y" ]; then if [ "$response" = "y" ] || [ "$response" = "Y" ]; then
printf "\n# Run fastfetch on shell initialization\nfastfetch\n" >>"$rc_file" printf "\n# Run fastfetch on shell initialization\nfastfetch\n" >>"$rc_file"
printf "%b\n" "${GREEN}Added fastfetch to $rc_file${RC}" printf "%b\n" "${GREEN}Added fastfetch to $rc_file${RC}"