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!
I'm trying to use smart-splits.nvim with psmux, which requires conditional keybindings like:
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:
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!