chore(scripts): edit_secrets opens Zed when installed

Takes precedence over the shell's $EDITOR (nano on terra); falls back to
the old $EDITOR/nano logic elsewhere.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-02 20:31:06 +02:00
co-authored by Claude Opus 5.5
parent 53a19c6b54
commit a5a07a8792
+4
View File
@@ -40,6 +40,10 @@ fi
# GUI editors (code/zed) return instantly unless forced to --wait, and if
# $EDITOR is unset no editor exists on the `nix shell` PATH, so bundle one.
editor="${VISUAL:-${EDITOR:-}}"
# Zed wherever it's installed, over the shell's $EDITOR.
if command -v zeditor >/dev/null 2>&1; then
editor="zeditor"
fi
extra=()
case "$editor" in
"") editor="nano"; extra=(nixpkgs#nano) ;; # sane default, bundled