diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:33:24 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 18:33:24 +0000 |
commit | 2d240c706fdccd408ed0ae47d59a98203f024d77 (patch) | |
tree | ba3d7ec67413ccec2cd03bd12993b1704642a7a6 /debian/patches/bash-default-editor.diff | |
parent | Adding upstream version 5.0. (diff) | |
download | bash-debian.tar.xz bash-debian.zip |
Adding debian version 5.0-4.debian/5.0-4debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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..2287edd --- /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 +@@ -927,8 +927,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 +Index: b/builtins/fc.def +=================================================================== +--- a/builtins/fc.def ++++ b/builtins/fc.def +@@ -161,11 +161,11 @@ set_verbose_flag () + } + + /* 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 |