feat(install): zsh is the default macOS shell; remote install keeps its prompts

- choose_macos_shell answers zsh on Enter, on no terminal and on an
  unknown value; MACOS_SHELL=bash still picks bash.
- remote-install.sh hands /dev/tty to install.sh when one can be opened:
  piped into bash, stdin was the script, so install.sh saw no terminal
  and silently skipped the identity, shell and offer questions.
- remote-install.sh cloned master by default; origin only has main
  (the documented raw URL 404s on master, 200 on main). README updated.
This commit is contained in:
@USER@
2026-10-07 15:42:34 +02:00
parent 2573756e73
commit cc490f57b3
4 changed files with 24 additions and 17 deletions
+8 -7
View File
@@ -345,18 +345,19 @@ install_colima_docker() {
start_brew_service colima
}
# macOS login shell: bash (brew's bash 5 + bashrc-osx) or zsh (oh-my-zsh +
# zshrc-osx). MACOS_SHELL=bash|zsh answers in advance; with no terminal attached
# and no answer, bash. Prints the choice on stdout (the question goes to stderr).
# macOS login shell: zsh (oh-my-zsh + zshrc-osx, the macOS default) or bash
# (brew's bash 5 + bashrc-osx). MACOS_SHELL=bash|zsh answers in advance; with no
# terminal attached and no answer, zsh. Prints the choice on stdout (the question
# goes to stderr).
choose_macos_shell() {
local answer="${MACOS_SHELL:-}"
if [ -z "$answer" ] && [ -t 0 ]; then
read -rp "Login shell on macOS: bash or zsh (oh-my-zsh)? [bash] " answer || true
read -rp "Login shell on macOS: zsh (oh-my-zsh) or bash? [zsh] " answer || true
fi
case "$answer" in
zsh) echo zsh ;;
bash|"") echo bash ;;
*) echo "Unknown shell '$answer' — using bash" >&2; echo bash ;;
zsh|"") echo zsh ;;
bash) echo bash ;;
*) echo "Unknown shell '$answer' — using zsh" >&2; echo zsh ;;
esac
}