Merge feature/macos-zsh-default into develop

This commit is contained in:
@USER@
2026-10-07 15:45:34 +02:00
5 changed files with 27 additions and 17 deletions
+3
View File
@@ -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 `</dev/tty` when openable. Found: BRANCH default `master`, origin has only `main` (raw URL 404) → `main`. Lint OK, chooser tested 4 values. Branch feature/macos-zsh-default, not merged. Other session: feature/repo-sync open (CLAUDE.md layout already lists repo-sync).
+2 -2
View File
@@ -42,8 +42,8 @@ cloudpex/{cloudpex,install.sh,README.md} on-demand SMB mount helper → /usr/loc
install.sh offers to mask `tmp.mount`. Swap is not the fix (the cap and ENOSPC stay).
macOS: install.sh swaps apt-get for Homebrew (colima for Docker, brew services for
code-server/mariadb, `~/.bash_profile` → `~/.bashrc`), asks bash or zsh (`MACOS_SHELL`
presets it; zsh = oh-my-zsh + `zsh/` files, bash = brew bash 5) and prints the Linux-only
code-server/mariadb, `~/.bash_profile` → `~/.bashrc`), asks zsh or bash (zsh by default,
`MACOS_SHELL` presets it; zsh = oh-my-zsh + `zsh/` files, bash = brew bash 5) and prints the Linux-only
items it skipped. Keep `bashrc-osx` = `bashrc-linux` + macOS deltas only, and the zsh
files in step with them (same env, aliases, prompt).
+4 -4
View File
@@ -7,7 +7,7 @@ Personal dotfiles — vim + bash configuration and a one-shot installer.
Install everything (clone + setup) with one command:
```sh
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
```
(Runs a remote script through `bash` — see the [Install](#install) section for what it does and the manual alternative.)
@@ -43,10 +43,10 @@ curl -fsSL https://git.bchanot.fr/bchanot/config/raw/branch/master/remote-instal
### One-liner (clone + install)
```sh
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
```
`remote-install.sh` ensures `git` is present, clones the repo to `~/config` (or pulls if already there), then runs `install.sh`. Override with env vars: `REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash`.
`remote-install.sh` ensures `git` is present, clones the repo to `~/config` (or pulls if already there), then runs `install.sh` with the terminal as its stdin, so the questions below (identity, macOS shell, offers) are asked even though the script arrives through a pipe. Override with env vars: `REPO_URL=... CLONE_DIR=... BRANCH=... curl ... | bash`.
> 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.
+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
}
+9 -3
View File
@@ -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"
if ( : </dev/tty ) 2>/dev/null; then
bash "$CLONE_DIR/install.sh" </dev/tty
else
bash "$CLONE_DIR/install.sh"
fi