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:
@@ -40,6 +40,10 @@ fi
|
|||||||
# GUI editors (code/zed) return instantly unless forced to --wait, and if
|
# 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 is unset no editor exists on the `nix shell` PATH, so bundle one.
|
||||||
editor="${VISUAL:-${EDITOR:-}}"
|
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=()
|
extra=()
|
||||||
case "$editor" in
|
case "$editor" in
|
||||||
"") editor="nano"; extra=(nixpkgs#nano) ;; # sane default, bundled
|
"") editor="nano"; extra=(nixpkgs#nano) ;; # sane default, bundled
|
||||||
|
|||||||
Reference in New Issue
Block a user