diff --git a/agenda b/agenda index 6458fa7..9a27a44 100644 --- a/agenda +++ b/agenda @@ -1,6 +1,8 @@ #!/usr/bin/env bash set -euo pipefail +AGENDA_EDITOR=${VISUAL:-${EDITOR:-vi}} + # The home of all files read and written by agenda. # # If this is left empty, this will default to the xdg user DOCUMENTS directory (in a @@ -169,7 +171,7 @@ __edit() { if [ "$opt_E" = "no" ]; then export AGENDA_FILE="$file" - exec ${VISUAL:-${EDITOR:-vi}} "$file" + exec $AGENDA_EDITOR "$file" else echo "$file" fi