Skip to content

tmux run-shell 'fzf --tmux' broken in v0.61.2 #4360

@Ikke

Description

@Ikke

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.61.2 (AlpineLinux)

OS

  • Linux
  • macOS
  • Windows
  • Etc.

Shell

  • bash
  • zsh
  • fish

Problem / Steps to reproduce

Since upgrading to v0.61.2, tmux run-shell 'fzf --tmux' returns

'fzf --tmux' returned 2

This works with v0.61.1

Bisecting leads to af8fe91 (#4351), which checks for TMUX_PANE to be present. But it appears that variable is not available in tmux run-shell either:

 tmux run-shell 'printenv TMUX_PANE'                                                                                                                                                                           
'printenv TMUX_PANE' returned 1

So this change breaks my tmux setup, which does:

bind -n C-f run-shell -b "tmux list-sessions -F \"##S\" | fzf --tmux bottom,15 | xargs -r tmux switch-client -t"

Reverting that commit makes that binding work again. Another workaround would be to explicitly define TMUX_PANE to something in that binding, but that seems to be more of a hack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions