I've created a helper function to display a message into the current pane:
function current_pane_id {
echo "$(tmux display -p '#{pane_id}')"
}
function display_message {
message="$1"
"$(tmux display-message -p -t"$(current_pane_id)" "'$message'")"
}
that is used like this:
display_message "turned display on"
The problem is that rather then pass the content of $message
to to the command, it keeps trying to execute the content of $message
, and it doesn't seem to matter how I try to quote it, it keeps executing it.
How do I pass the content of the variable to the command without having bash execute it?