Bug 2346805

Summary: Bug in fzf fish keybindings
Product: [Fedora] Fedora EPEL Reporter: Juho Kuisma <juho.kuisma+redhat>
Component: fzfAssignee: Michel Lind <michel>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: epel9CC: epel-packagers-sig, go-sig, michel, quantum.analyst
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Juho Kuisma 2025-02-20 13:54:12 UTC
Description of problem:

0.58.0 ships broken fish key bindings. This has been fixed four days after the 0.58.0 release in:

```
commit 26b9f5831a352f501e426d9e5c0c588a3656b0be
Author: bitraid <bitraid>
Date:   Fri Jan 24 10:15:43 2025 +0200

    [fish] Fix compatibility with v3.1.2 - v3.3.1 (#4200)

    Don't use the command substitution syntax: $(cmd)

    Fix #4196

diff --git a/shell/key-bindings.fish b/shell/key-bindings.fish
index f343bd15..15c53ef2 100644
--- a/shell/key-bindings.fish
+++ b/shell/key-bindings.fish
@@ -75,7 +75,7 @@ function fzf_key_bindings
           'string join0 -- $i\t(string replace -a -- \n \n\t $h[$i] | string collect);' \
           'end'
       end
-      set -l result (eval "$FZF_DEFAULT_COMMAND | $(__fzfcmd) --read0 --print0 -q (commandline) --bind='enter:become:string replace -a -- \n\t \n {2..} | string collect'")
+      set -l result (eval $FZF_DEFAULT_COMMAND \| (__fzfcmd) --read0 --print0 -q (commandline | string escape) "--bind=enter:become:'string replace -a -- \n\t \n {2..} | string collect'")
       and commandline -- $result
     end
     commandline -f repaint
```

Version-Release number of selected component (if applicable):

0.58.0

How reproducible:

Always

Steps to Reproduce:

```
$ fish
$ fzf --fish | source
```

Actual results:

- (line 79): $(...) is not supported. In fish, please use '(__fzfcmd)'.
      set -l result (eval "$FZF_DEFAULT_COMMAND | $(__fzfcmd) --read0 --print0 -q (commandline) --bind='enter:become:string replace -a -- \n\t \n {2..} | string collect'")
                                                  ^
from sourcing file -
source: Error while reading file '<stdin>'

Expected results:

$ echo $status
0

Additional info:

Can easily be fixed manually, but rather annoying to deal with this every time when spinning up new machines.

Cheers, Juho