diff --git a/git/gitconfig b/git/gitconfig index b47cc7d..79772ed 100644 --- a/git/gitconfig +++ b/git/gitconfig @@ -21,7 +21,7 @@ [gpg] format = ssh [gpg "ssh"] - program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign" + program = "~/dotfiles/scripts/op-ssh-sign" [color] ui = auto [github] diff --git a/scripts/op-ssh-sign b/scripts/op-ssh-sign new file mode 100755 index 0000000..6810962 --- /dev/null +++ b/scripts/op-ssh-sign @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +# git's gpg.ssh.program: 1Password ships op-ssh-sign at a different path per OS. +set -euo pipefail + +for bin in \ + /Applications/1Password.app/Contents/MacOS/op-ssh-sign \ + "$HOME/Applications/1Password.app/Contents/MacOS/op-ssh-sign" \ + /opt/1Password/op-ssh-sign; do + [[ -x "$bin" ]] && exec "$bin" "$@" +done + +echo "op-ssh-sign not found; is the 1Password desktop app installed?" >&2 +exit 1 diff --git a/zsh/zshenv b/zsh/zshenv index 99d0e78..0d3000c 100644 --- a/zsh/zshenv +++ b/zsh/zshenv @@ -1,3 +1,9 @@ +# Snap terminals (Ghostty on Linux) inject LC_ALL=C.UTF-8, which Homebrew's glibc +# doesn't ship, so brew-built binaries warn. Drop only that value -- every zsh sources +# this file, and `LC_ALL=C sort ...` should still work. No-op on macOS. +[[ "$LC_ALL" == "C.UTF-8" ]] && unset LC_ALL +export LANG="${LANG:-en_US.UTF-8}" + # zsh being installed via homebrew leads to some directories used for autocomplete # being considered insecure by zsh, this disables that check since we trust homebrew export ZSH_DISABLE_COMPFIX=true