diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-08 11:48:42 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-08 11:48:42 +0400 |
commit | 597d7d4d9df6e688e766f1da1c7de92b191fbde9 (patch) | |
tree | e758dd00a56a9039deba2abab755033466bd0cbf /debian/patches/bash-default-editor.diff | |
download | bash-debian/4.3-11.tar.gz |
Debian bash 4.3-11debian/4.3-11debian
Diffstat (limited to 'debian/patches/bash-default-editor.diff')
-rw-r--r-- | debian/patches/bash-default-editor.diff | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/patches/bash-default-editor.diff b/debian/patches/bash-default-editor.diff new file mode 100644 index 0000000..020fd80 --- /dev/null +++ b/debian/patches/bash-default-editor.diff @@ -0,0 +1,35 @@ +# DP: Use `command -v editor`, as an editor, if available. + +Index: b/bashline.c +=================================================================== +--- a/bashline.c ++++ b/bashline.c +@@ -926,8 +926,8 @@ + 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 +Index: b/builtins/fc.def +=================================================================== +--- a/builtins/fc.def ++++ b/builtins/fc.def +@@ -159,11 +159,11 @@ + #endif + + /* String to execute on a file that we want to edit. */ +-#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}" ++#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo vi)}}" + #if defined (STRICT_POSIX) + # define POSIX_FC_EDIT_COMMAND "${FCEDIT:-ed}" + #else +-# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-ed}}" ++# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-$(command -v editor || echo ed)}}" + #endif + + int |