summaryrefslogtreecommitdiff
path: root/bashline.c
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-12 13:57:46 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-14 16:17:01 -0800
commitf533861f868afc167aae06968db5bc138729189f (patch)
treeeff8b5e0ce0b88c2ab470a1bfd841668f26a005d /bashline.c
parentfc7695ee76400ee9833301f98a3fe483d64591b5 (diff)
downloadvyatta-bash-f533861f868afc167aae06968db5bc138729189f.tar.gz
vyatta-bash-f533861f868afc167aae06968db5bc138729189f.zip
patched with "debian_patches" in bash_3.1dfsg-8.diff.gz
Diffstat (limited to 'bashline.c')
-rw-r--r--bashline.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bashline.c b/bashline.c
index 496f6c1..776bdf4 100644
--- a/bashline.c
+++ b/bashline.c
@@ -800,8 +800,8 @@ operate_and_get_next (count, c)
command being entered (if no explicit argument is given), otherwise on
a command from the history file. */
-#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\""
-#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\""
+#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo vi)}}\""
+#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-$(command -v editor || echo emacs)}}\""
#define POSIX_VI_EDIT_COMMAND "fc -e vi"
static int