diff --git a/.claude/memory/journal.md b/.claude/memory/journal.md index 9068865..950ebf3 100644 --- a/.claude/memory/journal.md +++ b/.claude/memory/journal.md @@ -114,3 +114,6 @@ Done: MouseDrag1Pane binding had `\"` inside '...' (literal since tmux 3.0); bra ## 2026-10-07 — tmux dim inactive panes Done: window-style / window-active-style added. Two traps: colour234 ≈ iTerm2 dark bg (#15191f) → invisible; `window-active-style bg=default` inherits window-style since tmux 3 → active pane dimmed too, terminal colours hardcoded instead (fg #dcdcdc, bg #15191f). Inactive settled at #353d48 / #a6acb6 after 3 live rounds. Light macOS theme would need the inverse. Merged feature/tmux-dim-inactive-panes → develop. + +## 2026-10-07 (2) — macOS zsh default, remote-install prompts +Done: choose_macos_shell default bash → zsh (Enter, no tty, unknown value). Found: `curl | bash` path never asked USER/EMAIL (stdin = pipe → `[ -t 0 ]` false → login name + empty email, bash, no offers); remote-install.sh now runs install.sh ` Piping a remote script into `bash` runs unreviewed code over the network. Read [`remote-install.sh`](remote-install.sh) first, or use the manual clone below. @@ -98,7 +98,7 @@ The script is re-runnable: each run re-backs up to `~/Oldconfig` (overwriting th ### macOS -The same `./install.sh` detects macOS and replaces `apt-get` with Homebrew. It first asks which login shell you want, **bash** or **zsh** (`[bash]` by default; answer in advance with `MACOS_SHELL=zsh ./install.sh`, and with no terminal attached it picks bash): +The same `./install.sh` detects macOS and replaces `apt-get` with Homebrew. It first asks which login shell you want, **zsh** or **bash** (`[zsh]` by default; answer in advance with `MACOS_SHELL=bash ./install.sh`, and with no terminal attached it picks zsh): 1. Installs Homebrew with its official script when `brew` is missing (this also pulls the Xcode Command Line Tools: clang, make, git), then `brew update` + `brew upgrade`. 2. Installs the apt list mapped to formulae: `vim git git-lfs git-filter-repo gitleaks pkgconf shellcheck gh git-delta curl gnupg lftp inetutils unzip tree tmux fzf dtach node python pipx php mariadb imagemagick ffmpeg weasyprint poppler qpdf webp libavif bash`. Brew's `php` already ships gd, mbstring, xml, intl, curl and mysql. diff --git a/install.sh b/install.sh index da5e97b..bf5f636 100755 --- a/install.sh +++ b/install.sh @@ -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 } diff --git a/remote-install.sh b/remote-install.sh index d83b79b..6041920 100755 --- a/remote-install.sh +++ b/remote-install.sh @@ -1,14 +1,14 @@ #!/usr/bin/env bash # remote-install.sh — one-liner bootstrap: clone this repo, then run install.sh. # Usage: -# curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-install.sh | bash +# curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/main/remote-install.sh | bash # Override defaults with env vars: # REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash set -euo pipefail REPO_URL="${REPO_URL:-https://git.bchanot.fr/bchanot/config.git}" CLONE_DIR="${CLONE_DIR:-$HOME/config}" -BRANCH="${BRANCH:-master}" +BRANCH="${BRANCH:-main}" # git is required to fetch the repo. Install it on Debian/Ubuntu, else bail with a hint. if ! command -v git >/dev/null 2>&1; then @@ -36,6 +36,12 @@ else git clone --quiet --branch "$BRANCH" "$REPO_URL" "$CLONE_DIR" fi -# Hand off to the OS-detecting installer. +# Hand off to the OS-detecting installer. Piped into bash, stdin is the script +# itself, so install.sh would see no terminal and skip every question (identity, +# macOS shell, offers). Give it the terminal back when there is one. echo "Running install.sh" -bash "$CLONE_DIR/install.sh" +if ( : /dev/null; then + bash "$CLONE_DIR/install.sh"