Yes. Part of the plan for keeping commands as commands rather than strings
was to make eg bind-key be able to pretty print. Being able to make formats
pretty printed would be a nice step. Might be worth making each option have
a flag to say whether it holds a format or not, so show-option could do it
automatically? (would probably still want a flag to show w/o for parsing)

On Wed, 4 Jun 2025, 23:56 Michael Grant, <[email protected]> wrote:

>
>
> I've been working on the status line formats recently.  These variables,
> in the C code are nicely indented.  Is there some way to deal with format
> variables in a friendly way in the config file and in the shell passing as
> an arg to `tmux set`?
>
> I didn't see any way to pretty-print a format variable so I wrote
> something in C.  It could be added as an option to `show-option`, but it
> would be useful if the output of such a formatted variable was able to be
> directly read back in.  I did not find any easy, friendly way.  I was
> wondering other people do.  Like modifying a popup menu is really tedious
> all in one single line.
>
> If there is truly no way at this moment, what about making an option to
> `show-option` which pretty prints with leading tabs and newlines, and an
> option to `set-option` which ignores leading tabs and trailing newlines?
> Would this be useful?  I will happily drop this in a PR.
>
> Michael Grant
>
> --
> You received this message because you are subscribed to the Google Groups
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion, visit
> https://groups.google.com/d/msgid/tmux-users/CD5149BD-5D02-4E35-8C9D-36C980D7DABB%40gmail.com
> <https://groups.google.com/d/msgid/tmux-users/CD5149BD-5D02-4E35-8C9D-36C980D7DABB%40gmail.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion, visit 
https://groups.google.com/d/msgid/tmux-users/CAEdLfcE1%3Dxy6UD7g8hfskC6kCM1OBvTh-gGd6%3DQH-9BYNaca%3Dg%40mail.gmail.com.

Reply via email to