Skip to content

Option -F on bindings doesn't expand format variables (breaks smart-splits.nvim integration) #183

@Eryx5502

Description

@Eryx5502

I'm trying to use smart-splits.nvim with psmux, which requires conditional keybindings like:

bind-key -n C-h if-shell -F "#{@pane-is-vim}" "send-keys C-h" "select-pane -L"

This doesn't work — psmux always takes the true branch regardless of whether neovim is running in the pane.

I asked Claude Code to investigate and it identified the issue: when if-shell -F is used, the condition string is never expanded through expand_format(). Both config.rs:1495-1496 and server/connection.rs:1636-1637 just check if the raw literal is non-empty:

!condition.is_empty() && condition != "0"

So #{@pane-is-vim} is always truthy as a raw string, and the format variable is never actually evaluated.

I'm not familiar with Rust or the codebase so maybe this just doesn't make sense, but the issue is there nevertheless.

Thanks for the work!

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