I would like to set date +"%m %d %y" to a variable in my tmux.conf file to set it to set-option -g set-titles-string. How can I store the value of the output of the shell command in tmux.conf and dereference it later?

  • Were you able to figure out how to do this?
    – Jethro Cao
    Oct 2, 2023 at 17:02

1 Answer 1


I needed to do something similar, and was able to figure out how. Using what OP wanted as an example, it'd be something like:

curr_date='#(date +"%m %d %y")'
set-option -g set-titles-string $curr_date

You must log in to answer this question.

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