From 429d3100118d205f7d50ce323ae47a11181afee5 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Mon, 11 Jul 2011 16:40:10 +0200 Subject: [PATCH] nagbar: use less / vi as fallbacks for PAGER / EDITOR --- src/cfgparse.y | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cfgparse.y b/src/cfgparse.y index 22747108..64be7908 100644 --- a/src/cfgparse.y +++ b/src/cfgparse.y @@ -258,9 +258,9 @@ static void start_configerror_nagbar(const char *config_path) { if (configerror_pid == 0) { char *editaction, *pageraction; - if (asprintf(&editaction, TERM_EMU " -e $EDITOR \"%s\"", config_path) == -1) + if (asprintf(&editaction, TERM_EMU " -e ${EDITOR:-vi} \"%s\"", config_path) == -1) exit(1); - if (asprintf(&pageraction, TERM_EMU " -e $PAGER \"%s\"", errorfilename) == -1) + if (asprintf(&pageraction, TERM_EMU " -e ${PAGER:-less} \"%s\"", errorfilename) == -1) exit(1); char *argv[] = { NULL, /* will be replaced by the executable path */ -- 2.39.5