diff --git a/scripts/edit_secrets b/scripts/edit_secrets index 499b45a..0e6605f 100755 --- a/scripts/edit_secrets +++ b/scripts/edit_secrets @@ -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