aboutsummaryrefslogtreecommitdiffstats
path: root/community/fzf/do-not-require-bash-by-default.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/fzf/do-not-require-bash-by-default.patch')
-rw-r--r--community/fzf/do-not-require-bash-by-default.patch22
1 files changed, 22 insertions, 0 deletions
diff --git a/community/fzf/do-not-require-bash-by-default.patch b/community/fzf/do-not-require-bash-by-default.patch
new file mode 100644
index 0000000000..2eaf69f522
--- /dev/null
+++ b/community/fzf/do-not-require-bash-by-default.patch
@@ -0,0 +1,22 @@
+The default fzf command (i.e. if FZF_DEFAULT_COMMAND is not set) uses
+`set -o pipefail`. If this default command is used, fzf forces execution
+of this command with bash as pipefail is a bash extension. We want to
+make fzf work by default and do not want to force a dependency on bash.
+Fourtunatly, busybox ash (our default shell) also supports the pipefail
+option. As such, we can simply execute the default command with ash
+instead of bash.
+
+diff -upr fzf-0.27.0.orig/src/reader.go fzf-0.27.0/src/reader.go
+--- fzf-0.27.0.orig/src/reader.go 2021-04-08 17:32:00.960374521 +0200
++++ fzf-0.27.0/src/reader.go 2021-04-08 17:34:00.764210636 +0200
+@@ -98,8 +98,8 @@ func (r *Reader) ReadSource() {
+ r.startEventPoller()
+ var success bool
+ if util.IsTty() {
+- // The default command for *nix requires bash
+- shell := "bash"
++ // The default command for *nix requires pipefail support
++ shell := "ash"
+ cmd := os.Getenv("FZF_DEFAULT_COMMAND")
+ if len(cmd) == 0 {
+ if defaultCommand != "" {