Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Bootstrap/stow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,16 @@ get_packages() {
fi
done
else
local os
os=$(uname -s)
for dir in */; do
# Skip non-stow directories
[[ "$dir" == "Bootstrap/" ]] && continue
[[ "$dir" == "macOS/" ]] && continue # macOS-specific (apps, not symlinks)
if [[ "$os" != "Darwin" ]]; then
[[ "$dir" == "Hammerspoon/" ]] && continue
[[ "$dir" == "TeX/" ]] && continue
fi
PACKAGES+=("${dir%/}")
done
fi
Expand Down
4 changes: 2 additions & 2 deletions Git/.gitconfig-essential
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
remotes = remote -v

unstage = reset -q HEAD --
discard = checkout --
discard = restore --
Comment thread
dbmrq marked this conversation as resolved.
uncommit = reset --mixed HEAD~
amend = commit --amend --no-edit

Expand All @@ -50,7 +50,7 @@
wordRegex = .

[push]
default = upstream
default = simple
followTags = true
autoSetupRemote = true

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Works on both Intel and Apple Silicon Macs. The script is idempotent and can be
| `Vim/` | Both | Vim config; Neovim uses Lua with LSP, Treesitter, Telescope |
| `Yazi/` | Both | Yazi file manager configuration |
| `Zellij/` | Both | Zellij terminal multiplexer configuration |
| `Zsh/` | macOS | Zsh configuration (standalone) |
| `Zsh/` | Both | Zsh configuration (standalone) |
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The table now marks Zsh/ as "Both", but later this section still says "Platform-specific options are in .bash_aliases (Linux) and .zshrc (macOS)." That sentence looks outdated given .zshrc contains Linux paths/logic as well; consider updating it for consistency.

Copilot uses AI. Check for mistakes.

### Shell Configuration

Expand All @@ -59,7 +59,7 @@ Both Bash and Zsh source `~/.shell_common` for shared settings:
- PATH configuration
- Editor setup (auto-detects nvim if available)

Platform-specific options are in `.bash_aliases` (Linux) and `.zshrc` (macOS).
Platform-specific options are in `.bash_aliases` (Linux-specific) and `.zshrc` (additional shell-specific configuration).

## Individual Scripts

Expand Down
10 changes: 8 additions & 2 deletions Shell/.shell_common
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ alias la='ls -A'
alias l='ls -CF'

# Make zip archives easier
alias zipr='f() { zip -r "$1.zip" "$1"; }; f'
zipr() {
if [ -z "$1" ]; then
echo "Usage: zipr <directory-or-file-name>" >&2
return 1
fi
zip -r "$1.zip" "$1"
}

# Quick file search
alias ff='find . -name'

# Disk usage
alias duh='du -h --max-depth=1 2>/dev/null | sort -h'
alias duh='du -h -d 1 2>/dev/null | sort -h'

# =============================================================================
# Safety prompts
Expand Down
12 changes: 9 additions & 3 deletions Zsh/.zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ if [[ "$OSTYPE" == darwin* ]]; then
export BROWSER='open'
fi

# Editors
# Editor
export EDITOR='vim'
export VISUAL='vim'
export VISUAL="$EDITOR"

# Pager
export PAGER='less'

Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EDITOR/VISUAL are no longer set in .zprofile, so they won't be defined for login shells that don't read .zshrc (e.g., non-interactive login shells). If you still want these variables available in that scenario, consider sourcing ~/.shell_common from .zprofile (or keeping minimal EDITOR/VISUAL exports here).

Suggested change
# Editor
export EDITOR='vim'
export VISUAL="$EDITOR"

Copilot uses AI. Check for mistakes.
# Language
Expand Down Expand Up @@ -38,4 +40,8 @@ fi
TMPPREFIX="${TMPDIR%/}/zsh"

# Homebrew
eval "$(/opt/homebrew/bin/brew shellenv)"
if [[ -x /opt/homebrew/bin/brew ]]; then
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [[ -x /usr/local/bin/brew ]]; then
eval "$(/usr/local/bin/brew shellenv)"
fi
14 changes: 5 additions & 9 deletions Zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ fi
# =============================================================================
# Environment
# =============================================================================
# Default editor
export EDITOR='nvim'
export VISUAL='nvim'

# Smart URLs (from Prezto environment module)
autoload -Uz is-at-least
if [[ ${ZSH_VERSION} != 5.1.1 && ${TERM} != "dumb" ]]; then
Expand Down Expand Up @@ -43,6 +39,11 @@ unsetopt BG_NICE # Don't lower priority of background jobs
unsetopt HUP # Don't kill jobs on shell exit
unsetopt CHECK_JOBS # Don't report on jobs when shell exits

# =============================================================================
# Common Shell Configuration
# =============================================================================
[[ -f "$HOME/.shell_common" ]] && source "$HOME/.shell_common"

# =============================================================================
# History
# =============================================================================
Expand Down Expand Up @@ -320,11 +321,6 @@ if command -v nnn &>/dev/null; then
}
fi

# =============================================================================
# Common Shell Configuration
# =============================================================================
[[ -f "$HOME/.shell_common" ]] && source "$HOME/.shell_common"

# =============================================================================
# macOS-specific aliases
# =============================================================================
Expand Down