It looks like there might be a small bug in the tmux code that parses the layout strings.
Try prepending a space or a zero so that there are four characters before the first comma.
tmux select-layout ' 5ff,318x64,0,0{189x64,0,0,128x64,190,0[128x32,190,0,128x31,190,33]}'
tmux select-layout '05ff,318x64,0,0{189x64,0,0,128x64,190,0[128x32,190,0,128x31,190,33]}'
It is easy to overlook, but this extra padding is actually present in the list-windows
output. Here is an example with one extra space:
0: zsh* (3 panes) [193x46] [layout 71e,193x46,0,0{144x46,0,0,47,48x46,145,0[48x23,145,0,49,48x22,145,24,51]}] @44 (active)
And another with two extra spaces:
0: zsh* (3 panes) [193x46] [layout 49,193x46,0,0{81x46,0,0,47,111x46,82,0[111x23,82,0,49,111x22,82,24,51]}] @44 (active)
The above examples are from tmux 1.7, so they include an extra number for each pane as compared with your examples.
In general, you need to quote these layout strings to prevent the shell from interpreting
- the commas inside curly braces as “brace expansions” (e.g.
frob{ozz,nitz}
) and
- the square brackets as “pathname expansion” (i.e. like a
*.[ch]
glob/wildcard).
The quoting also makes it easy to include a space as the required padding.
The unintended globbing is unlikely to be a problem because you probably do not have any files that would match these commas-and-digits strings and most shells are configured (by default) to treat unmatched globs as literal strings (they are passed to the command in an unmodified form). The brace expansion, however, is always a problem (in shells that support it) because the shell will expand the layout string into multiple arguments. select-layout
is showing you its usage message because it received too many arguments (after the shell performed brace expansion on the layout string).
usage: select-layout [-np] [-t target-window] [layout-name]
. So it's not behaving properly without them either.