Skip to content

Setting FZF_DEFAULT_COMMAND breaks the Fish history widget after Shift+Delete #4862

Description

@morlipty

Checklist

  • I have read through the manual page (man fzf)
  • I have searched through the existing issues
  • For bug reports, I have checked if the bug is reproducible in the latest version of fzf

Output of fzf --version

0.74.0 (6765f46)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

fish: 4.8.1
terminal: kitty

Steps to reproduce

  1. Set a global FZF_DEFAULT_COMMAND, for example:
  2. set -gx FZF_DEFAULT_COMMAND 'fd --type file'
  3. Start a new Fish session.
  4. Press Ctrl+R to open the history widget.
  5. Press Shift+Delete on any history entry.

Expected behavior

The selected history entry is deleted and the history widget reloads, continuing to display the updated history.

Actual behavior

After the reload, the history widget is broken and no longer shows the expected history entries.

Configuration files

~/.config/fish/conf.d/env.fish

~/.config/fish/conf.d/env.fish
set -gx FZF_DEFAULT_OPTS "\
--color=bg+:#313244,bg:#1E1E2E,spinner:#F5E0DC,hl:#F38BA8 \
--color=fg:#CDD6F4,header:#F38BA8,info:#CBA6F7,pointer:#F5E0DC \
--color=marker:#B4BEFE,fg+:#CDD6F4,prompt:#CBA6F7,hl+:#F38BA8 \
--color=selected-bg:#45475A \
--color=border:#6C7086,label:#CDD6F4"

set -gx FZF_DEFAULT_COMMAND 'fd --type file'
set -gx FZF_CTRL_T_COMMAND "fd --hidden"
set -gx FZF_ALT_C_COMMAND "fd --hidden --type directory"
set -gx FZF_CTRL_R_OPTS "--style full --height 20 --with-nth=1,3.."

~/.config/fish/config.fish

function fish_greeting
    if test "$KITTY_WINDOW_ID" = 1
        fastfetch --config examples/13
    end
end

function fish_user_key_bindings
    fish_vi_key_bindings
    bind -M insert ctrl-z '__fish_echo fg 2>/dev/null'
end

if status is-interactive
    fzf --fish | source
    starship init fish | source
    zoxide init --cmd cd fish | source
end

fish_config theme choose default
Screencast_20260719_011113.webm

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions