浏览代码

installer: ask user about changing the shell to zsh

Marc Cornellà 5 年之前
父节点
当前提交
b944fee6ea
共有 1 个文件被更改,包括 9 次插入0 次删除
  1. 9 0
      tools/install.sh

+ 9 - 0
tools/install.sh

@@ -159,6 +159,15 @@ setup_shell() {
 
 	echo "${BLUE}Time to change your default shell to zsh:${RESET}"
 
+	# Prompt for user choice on changing the default login shell
+	printf "${YELLOW}Do you want to change your default shell to zsh? [Y/n]${RESET} "
+	read opt
+	case $opt in
+		y*|Y*|"") echo "Changing the shell..." ;;
+		n*|N*) echo "Shell change skipped."; return ;;
+		*) echo "Invalid choice. Shell change skipped."; return ;;
+	esac
+
 	# Test for the right location of the "shells" file
 	if [ -f /etc/shells ]; then
 		shells_file=/etc/shells