Bug 2346805 - Bug in fzf fish keybindings
Summary: Bug in fzf fish keybindings
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: fzf
Version: epel9
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Michel Lind
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-02-20 13:54 UTC by Juho Kuisma
Modified: 2025-02-20 13:54 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.