I wrote a bash script to display cmus status in tmux status bar. It has worked fine for a while, but recently after a fresh reinstall of Debian 9 tmux displays <'path/cmus-status.sh' not ready> instead of cmus status. I add the following in ~/.tmux.conf to run the script:

set -g status-right '... #(path/cmus-status.sh) ...'

From this thread I learnt the problem is probably because tmux considers execution of the script "unfinished" and waits for it to end before displaying output. But the script is an infinite while loop and not intended to stop.

If this is the cause, is there a way to tell tmux not to wait for scripts to finish and just display whatever they output? Or is this more of a tmux version-related issue?

1 Answer 1


I tested tmux 2.3 and 2.6 which I have to hand, and the newer version seems to work well updating from an infinite command, but the old version does not. You seem to need at least 2.5, as you can see in the CHANGES file:

CHANGES FROM 2.4 TO 2.5, 09 May 2017

If a #() command doesn't exit, continue to read from it and use its last full line of output.

  • Seems that Debian 9 uses tmux 2.3. Tried tmux 2.6 and 2.8 after # apt purge tmux* with no luck, still displays the "not ready" message.
    – UM-Li
    Jan 13, 2019 at 0:35
  • 1
    [Update] Forgot to run $ tmux kill-server before starting a newer version of tmux. Ran this and everything now works fine.
    – UM-Li
    Jan 13, 2019 at 2:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .