Add additional pane sort orders.

This commit is contained in:
nicm
2026-07-03 15:35:51 +00:00
parent e1fc6b31ee
commit 6967f54774
2 changed files with 13 additions and 1 deletions

View File

@@ -5426,6 +5426,12 @@ format_replace(struct format_expand_state *es, const char *key, size_t keylen,
sc->reversed = 0;
break;
}
if (strchr(fm->argv[0], 'i') != NULL)
sc->order = SORT_INDEX;
else if (strchr(fm->argv[0], 'z') != NULL)
sc->order = SORT_Z;
else
sc->order = SORT_CREATION;
if (strchr(fm->argv[0], 'r') != NULL)
sc->reversed = 1;
else

8
tmux.1
View File

@@ -6856,7 +6856,13 @@ to sort in reverse order.
.Ql /r\&
can also be used with
.Ql P:\&
to reverse the sort order by pane index.
to reverse the sort order; by default panes are sorted by creation order.
.Ql P:\&
can also take
.Ql /i\&
to sort by pane index or
.Ql /z\&
to sort by z-index.
For example,
.Ql S/nr:\&
to sort sessions by name in reverse order.